Octogram.Orchestrator_state
val initial_state : ?prometheus:Remote_prometheus.t -> Global_variables.t -> t
val get_agent : t -> Agent_name.t -> Remote_agent.t
val iter_agents :
Execution_params.mode ->
t ->
(Remote_agent.t -> unit Lwt.t) ->
unit Lwt.t
val record_agent : t -> Remote_agent.t -> unit
val forget_agent : t -> Agent_name.t -> unit
val get_global_variables : t -> Global_variables.t
val with_global_variables :
t ->
(Global_variables.t -> Global_variables.t) ->
unit
with_global_variables state f
uses the blocking function f
to update the global variables of state
. This is the only way to modify the global variables, as a mitigation for the highly asynchronous nature of the orchestrator.
That is, you get the freshest version possible of the global variables before you update it, compare to using a get
/set
pattern.
val uri_resolver : t -> Uri_resolver.t
val record_metrics_source :
t ->
Agent_name.t ->
string ->
string ->
int ->
unit
val with_prometheus : default:'a -> t -> (Remote_prometheus.t -> 'a) -> 'a