Module Ketrew.Engine

module Engine: sig .. end


The engine of the actual Workflow Engine.
type t 
The contents of the application engine.
val with_engine : configuration:Ketrew.Configuration.engine ->
(engine:t ->
(unit,
[> `Database of Persistent_data.Error.database
| `Dyn_plugin of [> `Dynlink_error of Dynlink.error | `Findlib of exn ]
| `Failure of string ]
as 'merge_error)
Unix_io.Deferred_result.t) ->
(unit, 'merge_error) Unix_io.Deferred_result.t
Create a engine.t, run the function passed as argument, and properly dispose of it.
val load : configuration:Ketrew.Configuration.engine ->
(t,
[> `Database of Persistent_data.Error.database
| `Dyn_plugin of [> `Dynlink_error of Dynlink.error | `Findlib of exn ]
| `Failure of string ])
Unix_io.Deferred_result.t
val unload : t ->
(unit, [> `Database of Persistent_data.Error.database ])
Unix_io.Deferred_result.t
val configuration : t -> Ketrew.Configuration.engine
Retrieve the configuration.
val add_targets : t ->
Ketrew_pure.Target.t list ->
(unit, [> `Database of Persistent_data.Error.database ])
Unix_io.Deferred_result.t
Add a list of targets to the engine.
val get_target : t ->
Ketrew_pure.Internal_pervasives.Unique_id.t ->
(Ketrew_pure.Target.t, [> `Database of Persistent_data.Error.database ])
Unix_io.Deferred_result.t
Get a target from its id.
val get_list_of_target_ids : t ->
Ketrew_pure.Protocol.Up_message.target_query ->
(Ketrew_pure.Target.id list,
[> `Database of Persistent_data.Error.database ])
Unix_io.Deferred_result.t
Get only the Ids of the targets for a given “query”:


val next_changes : t ->
(Persistent_data.Change.t list, 'a) Unix_io.Deferred_result.t
Block until the next batch of changes happening at the persistence-level, this stream is itself rate-limited.
module Run_automaton: sig .. end
val get_status : t ->
Ketrew_pure.Target.id ->
(Ketrew_pure.Target.State.t,
[> `Database of Persistent_data.Error.database
| `IO of
[> `Read_file_exn of string * exn | `Write_file_exn of string * exn ]
| `System of [> `File_info of string ] * [> `Exn of exn ] ])
Unix_io.Deferred_result.t
Get the state description of a given target (by “id”).
val kill : t ->
id:Ketrew_pure.Internal_pervasives.Unique_id.t ->
(unit, [> `Database of Persistent_data.Error.database ])
Unix_io.Deferred_result.t
Kill a target
val restart_target : t ->
Ketrew_pure.Target.id ->
(Ketrew_pure.Target.id, [> `Database of Persistent_data.Error.database ])
Unix_io.Deferred_result.t
Make new activated targets out of a given target and its “transitive reverse dependencies”
val host_io : t -> Host_io.t