S.MyNode
type condition = State.t -> bool
type handle_command = Condition_label.t * condition * transition
type message_command = Message_label.t * message_condition * message_transition
val on : Condition_label.t -> condition -> f:transition -> handle_command
val msg :
Message_label.t ->
message_condition ->
f:message_transition ->
message_command
val cancel : t -> ?tok:Timer_transport.tok option -> Timer_label.t -> unit
val timeout :
t ->
Timer_label.t ->
Core_kernel.Time.Span.t ->
f:transition ->
Timer_transport.tok
val timeout' :
t ->
Timer_label.t ->
Core_kernel.Time.Span.t ->
f:transition ->
unit
val next_ready : t -> unit Async_kernel.Deferred.t
val is_ready : t -> bool
val make_node :
transport:Timer_transport.t ->
logger:Logger.t ->
me:Trivial_peer.t ->
messages:Message.t Pipe_lib.Linear_pipe.Reader.t ->
?parent:t ->
initial_state:State.t ->
timer:Timer_transport.t ->
message_command list ->
handle_command list ->
t
val ident : t -> Trivial_peer.t
val send :
t ->
recipient:Trivial_peer.t ->
Message.t ->
unit Core_kernel.Or_error.t Async_kernel.Deferred.t
val send_exn :
t ->
recipient:Trivial_peer.t ->
Message.t ->
unit Async_kernel.Deferred.t
val send_multi :
t ->
recipients:Trivial_peer.t list ->
Message.t ->
unit Core_kernel.Or_error.t list Async_kernel.Deferred.t
val send_multi_exn :
t ->
recipients:Trivial_peer.t list ->
Message.t ->
unit Async_kernel.Deferred.t