module Worker: sig .. end
Persisting state for workers.
include Store.S
val forget : Store.t -> Worker.id -> unit Lwt.t
forget t removes all metadata about the worker.
val tick : Store.t -> Worker.id -> float -> unit Lwt.t
tick t w f updates the worker w's status with the timestamp
f. f is supposed to tbe the local worker time, i.e. the
current time since 00:00:00 GMT, Jan. 1, 1970, in seconds in the
worker referential.
val status : Store.t -> Worker.id -> Worker.status option Lwt.t
job t w is the worker w's current job. None means that the
worker is not alive anymore.
val start_job : Store.t -> Worker.id -> Job.id -> unit Lwt.t
start_job t w j asks the worker w to start working on the
build job j.
val start_task : Store.t -> Worker.id -> Task.id -> unit Lwt.t
start_task t w ta asks the worker w to start working on the
task ta.
val idle : Store.t -> Worker.id -> unit Lwt.t
idle t w registers that w is idle.
type diff = [ `Added of Worker.t | `Removed of Worker.id ]
The type for worker diffs.
val watch : Store.t -> diff Store.callback -> Store.cancel Lwt.t
watch t f calls f everytime a new worker is added.
val watch_status : Store.t ->
Worker.id -> Worker.status option Store.callback -> Store.cancel Lwt.t
watch_status t w f calls f everytime w's status is
updated. None means that the worker is not alive anymore.
val watch_ticks : Store.t -> Worker.id -> float Store.callback -> Store.cancel Lwt.t
watch_ticks t w f calls
f everytime the worker
w calls
Store.Worker.tick. Return a cancel function.