The callback handlers specific to each worker instance.
Builds the initial internal state of a worker at launch. It is possible to initialize the message queue. Of course calling
state will fail at that point.
The main request processor, i.e. the body of the event loop.
Called when no request has been made before the timeout, if the parameter has been passed to
val on_error :
('a, 'request_error) Request.t ->
unit Tezos_base.TzPervasives.tzresult Lwt.t
A function called at the end of the worker loop in case of an error. One can first log the incoming error. Then, the error can be filtered out by returning
return_unit and the worker execution continues, or the error can be propagated through a
tzresult, making the worker crash.