sig
type t
val remote : ?uri:Uri.t -> unit -> Store.t Lwt.t
val local : ?root:string -> unit -> Store.t Lwt.t
type 'a callback = 'a -> unit Lwt.t
type cancel = unit Store.callback
val with_transaction :
?retry:int -> Store.t -> string -> (Store.t -> unit Lwt.t) -> unit Lwt.t
module type S =
sig
type id
type value
val add : Store.t -> Store.S.value -> unit Lwt.t
val mem : Store.t -> Store.S.id -> bool Lwt.t
val get : Store.t -> Store.S.id -> Store.S.value Lwt.t
val list : Store.t -> Store.S.id list Lwt.t
end
module Worker :
sig
val add : t -> Worker.t -> unit Lwt.t
val mem : t -> Worker.id -> bool Lwt.t
val get : t -> Worker.id -> Worker.t Lwt.t
val list : t -> Worker.id list Lwt.t
val forget : Store.t -> Worker.id -> unit Lwt.t
val tick : Store.t -> Worker.id -> float -> unit Lwt.t
val status : Store.t -> Worker.id -> Worker.status option Lwt.t
val start_job : Store.t -> Worker.id -> Job.id -> unit Lwt.t
val start_task : Store.t -> Worker.id -> Task.id -> unit Lwt.t
val idle : Store.t -> Worker.id -> unit Lwt.t
type diff = [ `Added of Worker.t | `Removed of Worker.id ]
val watch :
Store.t -> Store.Worker.diff Store.callback -> Store.cancel Lwt.t
val watch_status :
Store.t ->
Worker.id ->
Worker.status option Store.callback -> Store.cancel Lwt.t
val watch_ticks :
Store.t -> Worker.id -> float Store.callback -> Store.cancel Lwt.t
end
module Task :
sig
val add : t -> Task.t -> unit Lwt.t
val mem : t -> Task.id -> bool Lwt.t
val get : t -> Task.id -> Task.t Lwt.t
val list : t -> Task.id list Lwt.t
val update_status : Store.t -> Task.id -> unit Lwt.t
val reset : Store.t -> Task.id -> unit Lwt.t
val status : Store.t -> Task.id -> Task.status Lwt.t
val jobs : Store.t -> Task.id -> Job.id list Lwt.t
val watch : Store.t -> Task.t Store.callback -> Store.cancel Lwt.t
val watch_status :
Store.t ->
Task.id -> Task.status Store.callback -> Store.cancel Lwt.t
end
module Job :
sig
val add : t -> Job.t -> unit Lwt.t
val mem : t -> Job.id -> bool Lwt.t
val get : t -> Job.id -> Job.t Lwt.t
val list : t -> Job.id list Lwt.t
val status : Store.t -> Job.id -> Job.status Lwt.t
val pending : Store.t -> Job.id -> unit Lwt.t
val running : Store.t -> Job.id -> unit Lwt.t
val success : Store.t -> Job.id -> unit Lwt.t
val failure : Store.t -> Job.id -> unit Lwt.t
val add_output : Store.t -> Job.id -> Object.id -> unit Lwt.t
val outputs : Store.t -> Job.id -> Object.id list Lwt.t
val watch : Store.t -> Job.t Store.callback -> Store.cancel Lwt.t
val watch_status :
Store.t -> Job.id -> Job.status Store.callback -> Store.cancel Lwt.t
end
module Object :
sig
val add : t -> Object.t -> unit Lwt.t
val mem : t -> Object.id -> bool Lwt.t
val get : t -> Object.id -> Object.t Lwt.t
val list : t -> Object.id list Lwt.t
end
end