module P : Injector_sigs.PARAMETERS
val init : Tezos_client_alpha.Protocol_client_context.full -> data_dir:string -> P.rollup_node_state -> signers: (Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash * Injector_sigs.injection_strategy * P.Tag.t list) list -> unit Tezos_base.TzPervasives.tzresult Lwt.t
Initializes the injector with the rollup node state, for a list of signers, and start the workers. Each signer has its own worker with a queue of operations to inject.
val add_pending_operation : ?source:Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash -> 'a Tezos_protocol_alpha.Protocol.Alpha_context.manager_operation -> unit Tezos_base.TzPervasives.tzresult Lwt.t
Add an operation as pending injection in the injector. If the source is not provided, the operation is queued to the worker which handles the corresponding tag.
val new_tezos_head : Tezos_client_alpha.Protocol_client_context.Alpha_block_services.block_info -> Tezos_client_alpha.Protocol_client_context.Alpha_block_services.block_info Injector_common.reorg -> unit Lwt.t
Notify the injector of a new Tezos head. The injector marks the operations appropriately (for instance reverted operations that are part of a reorganization are put back in the pending queue). When an operation is considered as confirmed, it disappears from the injector.
val inject : ?tags:P.Tag.t list -> ?strategy:Injector_sigs.injection_strategy -> unit -> unit Lwt.t
Trigger an injection of the pending operations for all workers. If
tags is given, only the workers which have a tag in
tags inject their pending operations. If
strategy is given, only workers which have this strategy inject their pending operations.
val shutdown : unit -> unit Lwt.t
Shutdown the injectors, waiting for the ongoing request to be processed.