class

Raft::TCPTransport

Inherits Raft::Transport < Reference < Object

Constructors

new(listen_address : String, listen_port : Int32, data_dir : String | Nil = nil, max_payload : UInt32 = (64_u32 * 1024_u32) * 1024_u32)
Source

Instance methods

outbox
Source
peer_address?(id : NodeID) : Tuple(String, Int32) | Nil

Look up a registered peer's host:port under the shared lock. Mutations happen on the dispatcher fiber via the commands channel.

Source
register_channel(group_id : UInt64, channel : Channel(Message))
Source
register_peer(id : NodeID, host : String, port : Int32)
Source
send(to : NodeID, message : Message)
Source
start
Source
stop
Source
to_prometheus(io : IO)
Source
unregister_channel(group_id : UInt64)
Source