sig
module Server_status :
sig
type t = {
time : float;
read_only : bool;
tls : [ `Native | `None | `OpenSSL ];
preemptive_bounds : int * int;
preemptive_queue : int;
libev : bool;
database : string;
host_timeout_upper_bound : float option;
maximum_successive_attempts : int;
concurrent_automaton_steps : int;
gc_minor_words : float;
gc_promoted_words : float;
gc_major_words : float;
gc_minor_collections : int;
gc_major_collections : int;
gc_heap_words : int;
gc_heap_chunks : int;
gc_compactions : int;
gc_top_heap_words : int;
gc_stack_size : int;
enable_ssh_ui : bool;
}
val create :
database:string ->
host_timeout_upper_bound:float option ->
maximum_successive_attempts:int ->
concurrent_automaton_steps:int ->
enable_ssh_ui:bool ->
time:float ->
read_only:bool ->
tls:[ `Native | `None | `OpenSSL ] ->
preemptive_bounds:int * int ->
preemptive_queue:int ->
libev:bool -> gc:Gc.stat -> Ketrew_pure.Protocol.Server_status.t
end
module Process_sub_protocol :
sig
module Command :
sig
type t = { connection : string; id : string; command : string; }
end
type up =
[ `Get_all_ssh_ids of string
| `Get_logs of string * [ `Full ]
| `Kill of string
| `Send_command of
Ketrew_pure.Protocol.Process_sub_protocol.Command.t
| `Send_ssh_input of string * string
| `Start_ssh_connection of
[ `Configured of string | `New of string * string ] ]
module Ssh_connection :
sig
type status =
[ `Alive of
[ `Askpass_waiting_for_input of (float * string) list
| `Idle ]
| `Configured
| `Dead of string
| `Unknown of string ]
type t = {
id : string;
name : string;
uri : string;
status :
Ketrew_pure.Protocol.Process_sub_protocol.Ssh_connection.status;
}
end
module Command_output :
sig type t = { id : string; stdout : string; stderr : string; } end
type down =
[ `Command_output of
Ketrew_pure.Protocol.Process_sub_protocol.Command_output.t
| `Error of string
| `List_of_ssh_ids of
Ketrew_pure.Protocol.Process_sub_protocol.Ssh_connection.t list
| `Logs of string * string
| `Ok ]
end
module Down_message :
sig
type t =
[ `Deferred_list_of_target_ids of string * int
| `List_of_query_descriptions of (string * string) list
| `List_of_target_flat_states of
(string * Target.State.Flat.t) list * float
| `List_of_target_ids of string list * float
| `List_of_target_summaries of (string * Target.Summary.t) list
| `List_of_targets of Target.t list
| `Missing_deferred
| `Notifications of (float * string) list
| `Ok
| `Process of Ketrew_pure.Protocol.Process_sub_protocol.down
| `Query_error of string
| `Query_result of string
| `Server_status of Ketrew_pure.Protocol.Server_status.t ]
val to_json : t -> Yojson.Safe.json
val of_json_exn : Yojson.Safe.json -> t
val serialize : t -> string
val deserialize_exn : string -> t
end
module Up_message :
sig
type time_constraint =
[ `All
| `Created_after of float
| `Not_finished_before of float
| `Status_changed_since of float ]
type string_predicate = [ `Equals of string | `Matches of string ]
type filter =
[ `And of Ketrew_pure.Protocol.Up_message.filter list
| `False
| `Has_tag of Ketrew_pure.Protocol.Up_message.string_predicate
| `Id of Ketrew_pure.Protocol.Up_message.string_predicate
| `Name of Ketrew_pure.Protocol.Up_message.string_predicate
| `Not of Ketrew_pure.Protocol.Up_message.filter
| `Or of Ketrew_pure.Protocol.Up_message.filter list
| `Status of
[ `Activated_by_user
| `Dead_because_of_dependencies
| `Failed_from_condition
| `Failed_from_running
| `Failed_from_starting
| `Killable
| `Killed_from_passive
| `Really_running
| `Simple of Target.State.simple ]
| `True ]
type target_query = {
time_constraint : Ketrew_pure.Protocol.Up_message.time_constraint;
filter : Ketrew_pure.Protocol.Up_message.filter;
}
val pp_target_query :
Format.formatter ->
Ketrew_pure.Protocol.Up_message.target_query ->
Ppx_deriving_runtime.unit
val show_target_query :
Ketrew_pure.Protocol.Up_message.target_query ->
Ppx_deriving_runtime.string
type query_option = [ `Block_if_empty_at_most of float ]
type t =
[ `Call_query of string * string
| `Get_available_queries of string
| `Get_deferred of string * int * int
| `Get_notifications of float option
| `Get_server_status
| `Get_target_flat_states of
[ `All | `Since of float ] * string list *
Ketrew_pure.Protocol.Up_message.query_option list
| `Get_target_ids of
Ketrew_pure.Protocol.Up_message.target_query *
Ketrew_pure.Protocol.Up_message.query_option list
| `Get_target_summaries of string list
| `Get_targets of string list
| `Kill_targets of string list
| `Process of Ketrew_pure.Protocol.Process_sub_protocol.up
| `Restart_targets of string list
| `Submit_targets of Target.t list ]
val to_json : t -> Yojson.Safe.json
val of_json_exn : Yojson.Safe.json -> t
val serialize : t -> string
val deserialize_exn : string -> t
val target_query_markup :
Ketrew_pure.Protocol.Up_message.target_query ->
Internal_pervasives.Display_markup.t
end
end