sig
module Error :
sig
type t =
[ `Http of
[ `Call of [ `GET | `POST ] * Uri.t
| `Target_query of Ketrew_pervasives.Unique_id.t * string
| `Targets ] *
[ `Exn of exn
| `Json_parsing of string * [ `Exn of exn ]
| `Unexpected_message of Ketrew_protocol.Down_message.t
| `Wrong_json of Yojson.Safe.json
| `Wrong_response of Cohttp.Response.t * string ]
| `Server_error_response of
[ `Call of [ `GET | `POST ] * Uri.t ] * string ]
val log : Ketrew_client.Error.t -> Ketrew_pervasives.Log.t
end
type t
val as_client :
configuration:Ketrew_configuration.t ->
f:(client:Ketrew_client.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
| `Wrong_configuration of [> `Found of string ] * [> `Exn of exn ] ]
as 'a)
Ketrew_unix_io.Deferred_result.t) ->
(unit, 'a) Ketrew_unix_io.Deferred_result.t
val configuration : Ketrew_client.t -> Ketrew_configuration.t
val get_local_engine : Ketrew_client.t -> Ketrew_engine.t option
val all_targets :
Ketrew_client.t ->
(Ketrew_target.t list,
[> `Client of Ketrew_client.Error.t
| `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_client.t ->
query:Ketrew_protocol.Up_message.target_query ->
(Ketrew_target.id list,
[> `Client of Ketrew_client.Error.t
| `Database of Trakeva.Error.t
| `Missing_data of string
| `Target of [> `Deserilization of string ] ])
Ketrew_unix_io.Deferred_result.t
val get_target :
Ketrew_client.t ->
id:Ketrew_target.id ->
(Ketrew_target.t,
[> `Client of Ketrew_client.Error.t
| `Database of Trakeva.Error.t
| `Missing_data of string
| `Target of [> `Deserilization of string ] ])
Ketrew_unix_io.Deferred_result.t
val get_targets :
Ketrew_client.t ->
id_list:Ketrew_target.id list ->
(Ketrew_target.t list,
[> `Client of Ketrew_client.Error.t
| `Database of Trakeva.Error.t
| `Missing_data of string
| `Target of [> `Deserilization of string ] ])
Ketrew_unix_io.Deferred_result.t
val call_query :
Ketrew_client.t ->
target:Ketrew_target.t ->
string ->
(string, Ketrew_pervasives.Log.t) Ketrew_unix_io.Deferred_result.t
val kill :
Ketrew_client.t ->
Ketrew_target.id list ->
(unit,
[> `Client of Ketrew_client.Error.t
| `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 restart :
Ketrew_client.t ->
Ketrew_target.id list ->
(unit,
[> `Client of Ketrew_client.Error.t
| `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 submit :
?override_configuration:Ketrew_configuration.t ->
Ketrew_edsl.user_target -> unit
end