Octogram.Remote_proceduretype ('a, 'uri) remote_procedure = ('a, 'uri) tmodule type S = sig ... endThe module type to implement in order to be able to make agents capable of executing a new kind of remote procedure
val packed_encoding : 'uri Data_encoding.t -> 'uri packed Data_encoding.tval encode_response : ('a, 'uri) t -> 'a -> stringval response_encoding : ('a, 'uri) t -> 'a Data_encoding.tval merged_encoding :
'a Data_encoding.t ->
'uri Data_encoding.t ->
('a * 'uri packed) Data_encoding.tval tvalue_of_response : ('a, 'uri) t -> 'a -> Jingoo.Jg_types.tvalueval expand :
self:Agent_name.t ->
vars:Global_variables.t ->
agent:Jingoo.Jg_types.tvalue ->
re:Jingoo.Jg_types.tvalue ->
item:Jingoo.Jg_types.tvalue ->
string packed ->
Uri.global_uri packedval resolve_global_uris :
self:Agent_name.t ->
Uri_resolver.t ->
Uri.global_uri packed ->
Uri.agent_uri packedval run : Agent_state.t -> ('a, Uri.agent_uri) t -> 'a Lwt.tval on_completion :
on_new_service:
(string ->
Services_cache.node_kind ->
Services_cache.service_kind ->
int ->
unit) ->
on_new_metrics_source:(string -> Services_cache.node_kind -> int -> unit) ->
('a, 'uri) t ->
'a ->
unitval register : (module S) -> unitregister (module P) plugs the remote procedure specified in P into Octogram machinery.
module P = struct
let name = _
type 'uri t = _
type r = _
let of_remote_procedure :
type a. (a, 'uri) Remote_procedure.t -> 'uri t option = function
| _ _ args -> Some args
| _ -> None
let to_remote_procedure args = _ args
let unify : type a. (a, 'uri) Remote_procedure.t -> (a, r) Remote_procedure.eq
= function
| _ -> Eq
| _ -> Neq
let encoding uri_encoding = _
let r_encoding = _
let tvalue_of_r args = _
let expand ~self ~run args = _
let resolve ~self resolver args = _
let run state args = _
let on_completion ~on_new_service ~on_new_metrics_source args = _
endval file_agent_uri :
self:Agent_name.t ->
resolver:Uri_resolver.t ->
Uri.global_uri ->
Uri.agent_urival global_uri_of_string :
self:Agent_name.t ->
run:(string -> string) ->
string ->
Uri.global_uri