Module Octogram.Job

This module introduces the definition of a Octogram job, that is an interaction between the orchestrator and one agent.

Note that one job can result in several interactions, depending on how the with_item field of the job header is used.

type items = item list
type with_items =
  1. | Seq of items
  2. | Prod of items list
val expand_item : vars:Global_variables.t -> agent:Jingoo.Jg_types.tvalue -> re:Jingoo.Jg_types.tvalue -> item -> Jingoo.Jg_types.tvalue Stdlib.Seq.t
type header = {
  1. name : string;
  2. with_items : with_items option;
    (*

    The job’ body will be executed once for every item listed in the with_items field, where each execution has its {{ item }} variable customized for the current value.

    If with_item is None, then the job’s body is executed once, with {{ item }} equal to null.

    *)
  3. mode : Execution_params.mode;
  4. vars_updates : Global_variables.update list;
}
type 'uri body =
  1. | Remote_procedure of {
    1. procedure : 'uri Remote_procedure.packed;
    }
    (*

    Request the targeted agent to execute the procedure.

    *)
  2. | Copy of {
    1. source : string;
    2. destination : string;
    }
    (*

    Copy destination to the targeted agent, relatively to destination.

    *)
val expand_body : self:Agent_name.t -> vars:Global_variables.t -> agent:Jingoo.Jg_types.tvalue -> re:Jingoo.Jg_types.tvalue -> item:Jingoo.Jg_types.tvalue -> string body -> Uri.global_uri body
type 'uri t = {
  1. header : header;
  2. body : 'uri body;
}
val encoding : 'uri Data_encoding.t -> 'uri t Data_encoding.t

Require to use the Register functor