Parameter Make.9-Ringcast_lwt
val init : me:node -> view:view -> view_len:int -> xchg_len:int -> period:float -> fanout:int -> seen_len:int -> io:io -> tinit node view view_len xchg_len period fanout seen_capinitializes a RingCast instance with the following configuration.- parameter me
this node
- parameter view
initial view
- parameter view_len
max view length
- parameter xchg_len
number of entries to exchange at each period
- parameter period
gossip period, in seconds
- parameter fanout
dissemination fanout
- parameter seen_len
length of queue of last seen message IDs
val run : ?stop:unit Lwt.t -> t -> unit Lwt.trun ?stop truns initiator thread: picks a random node fromviewto gossip with everyperiodseconds.If
?stopis provided, this initiator thread returns as soon as thestopthread is fulfilled.
val shutdown : t -> unitshutdown tstops initiator thread.In case
runwas called with astopargument, thestopthread is cancelled, otherwise it is fulfilled.
val respond : t -> node -> view -> view Lwt.trespond t node recvdmerges received entries from a node and sends response
val forward : t -> node -> mid -> Cstruct.t -> unit Lwt.tforward t src mid msgreceives a message (msgid, msg) from asrcnode and selects nodes from the local view it should be forwarded to (predecessor or successor on the ring and some random nodes, limited byfanout); callsIo.send_msgfor each selected node