sig
type t
val with_engine :
configuration:Ketrew_configuration.engine ->
(engine:Ketrew_engine.t ->
(unit,
[> `Database of Trakeva.Error.t
| `Database_unavailable of Ketrew_target.id
| `Dyn_plugin of
[> `Dynlink_error of Dynlink.error | `Findlib of exn ]
| `Failure of string ]
as 'merge_error)
Ketrew_unix_io.Deferred_result.t) ->
(unit, 'merge_error) Ketrew_unix_io.Deferred_result.t
val load :
configuration:Ketrew_configuration.engine ->
(Ketrew_engine.t,
[> `Database of Trakeva.Error.t
| `Dyn_plugin of [> `Dynlink_error of Dynlink.error | `Findlib of exn ]
| `Failure of string ])
Ketrew_unix_io.Deferred_result.t
val unload :
Ketrew_engine.t ->
(unit,
[> `Database of Trakeva.Error.t
| `Database_unavailable of Ketrew_target.id ])
Ketrew_unix_io.Deferred_result.t
val configuration : Ketrew_engine.t -> Ketrew_configuration.engine
val add_targets :
Ketrew_engine.t ->
Ketrew_target.t list ->
(unit,
[> `Database of Trakeva.Error.t
| `Database_unavailable of Ketrew_target.id
| `Missing_data of Ketrew_target.id
| `Target of [> `Deserilization of string ] ])
Ketrew_unix_io.Deferred_result.t
val get_target :
Ketrew_engine.t ->
Ketrew_pervasives.Unique_id.t ->
(Ketrew_target.t,
[> `Database of Trakeva.Error.t
| `Missing_data of string
| `Target of [> `Deserilization of string ] ])
Ketrew_unix_io.Deferred_result.t
val all_targets :
Ketrew_engine.t ->
(Ketrew_target.t list,
[> `Database of Trakeva.Error.t
| `IO of
[> `Read_file_exn of string * exn | `Write_file_exn of string * exn ]
| `Missing_data of Ketrew_target.id
| `System of [> `File_info of string ] * [> `Exn of exn ]
| `Target of [> `Deserilization of string ] ])
Ketrew_unix_io.Deferred_result.t
val get_list_of_target_ids :
Ketrew_engine.t ->
[ `All
| `Created_after of Ketrew_pervasives.Time.t
| `Not_finished_before of Ketrew_pervasives.Time.t ] ->
(Ketrew_target.id list,
[> `Database of Trakeva.Error.t
| `Missing_data of string
| `Target of [> `Deserilization of string ] ])
Ketrew_unix_io.Deferred_result.t
module Run_automaton :
sig
val step :
Ketrew_engine.t ->
(bool,
[> `Database of Trakeva.Error.t
| `Database_unavailable of Ketrew_target.id
| `Missing_data of Ketrew_target.id
| `Target of [> `Deserilization of string ] ])
Ketrew_unix_io.Deferred_result.t
val fix_point :
Ketrew_engine.t ->
([ `Steps of int ],
[> `Database of Trakeva.Error.t
| `Database_unavailable of Ketrew_target.id
| `Missing_data of Ketrew_target.id
| `Target of [> `Deserilization of string ] ])
Ketrew_unix_io.Deferred_result.t
end
val get_status :
Ketrew_engine.t ->
Ketrew_target.id ->
(Ketrew_target.State.t,
[> `Database of Trakeva.Error.t
| `IO of
[> `Read_file_exn of string * exn | `Write_file_exn of string * exn ]
| `Missing_data of string
| `System of [> `File_info of string ] * [> `Exn of exn ]
| `Target of [> `Deserilization of string ] ])
Ketrew_unix_io.Deferred_result.t
val kill :
Ketrew_engine.t ->
id:Ketrew_pervasives.String.t ->
(unit,
[> `Database of [> `Act of Trakeva.Action.t | `Load of string ] * string
| `Database_unavailable of string ])
Ketrew_unix_io.Deferred_result.t
val restart_target :
Ketrew_engine.t ->
Ketrew_target.id ->
(Ketrew_target.id,
[> `Database of Trakeva.Error.t
| `Database_unavailable of Ketrew_target.id
| `Missing_data of Ketrew_target.id
| `Target of [> `Deserilization of string ] ])
Ketrew_unix_io.Deferred_result.t
module Measure :
sig
val incomming_request :
Ketrew_engine.t ->
connection_id:string -> request:Cohttp.Request.t -> unit
val end_of_request :
Ketrew_engine.t ->
connection_id:string ->
request:Cohttp.Request.t ->
response_log:string -> body_length:int -> unit
val tag : Ketrew_engine.t -> string -> unit
end
module Measurements :
sig
val flush :
Ketrew_engine.t ->
(unit,
[> `Database of Trakeva.Error.t
| `Database_unavailable of Ketrew_target.id ])
Ketrew_unix_io.Deferred_result.t
val get_all :
Ketrew_engine.t ->
(Ketrew_measurement.Collection.t,
[> `Database of Trakeva.Error.t
| `Deserialization of exn * string
| `Missing_data of string ])
Ketrew_unix_io.Deferred_result.t
end
end