Octogram.Remote_agent
This module introduces the means to spawn and control agents on remote machine.
val octogram_binary_encoding : octogram_binary Data_encoding.t
A handler identifying an asynchronous procedure sent to an agent, to be used to fetch its response.
val wait : t -> Unix.process_status Lwt.t
wait agent
returns when the remote agent has successfully terminated.
val name : t -> Agent_name.t
val runner : t -> Tezt.Runner.t
val color : t -> Tezt.Log.Color.t
val scope : t -> string -> string
val create :
runner:Tezt.Runner.t ->
name:Agent_name.t ->
on_new_metrics_source:
(Agent_name.t -> string -> Services_cache.node_kind -> int -> unit) ->
octogram_binary:octogram_binary ->
?color:Tezt.Log.Color.t ->
?event_pipe:string ->
unit ->
t
val run :
?on_terminate:(Unix.process_status -> unit Lwt.t) ->
?event_level:Tezt_mavryk.Daemon.Level.default_level ->
?event_sections_levels:(string * Tezt_mavryk.Daemon.Level.level) list ->
t ->
unit Lwt.t
val wait_for_ready : t -> unit Lwt.t
wait_for_ready agent
returns when the remote agent has been through its initialization process and is ready for receiving requests.
val start_request :
t ->
('a, Uri.agent_uri) Remote_procedure.t ->
'a request_handler Lwt.t
start_request state proc
creates a new request for the execution of proc
and returns its handler. Use wait_for_request
to get the response back, when ready.
val wait_for_request : t -> 'a request_handler -> 'a Lwt.t
wait_for_request state handler
waits for the request identified by handler
to complete, and the agent responsible for executing it to return its response.
val get_service_info :
Services_cache.node_kind ->
Services_cache.service_kind ->
t ->
string ->
int
val to_tvalue : t -> Jingoo.Jg_types.tvalue