Documentation
¶
Index ¶
Constants ¶
View Source
const ( PeerIdHeader = 10 PeerAddrHeader = 11 RaftConnectType = 2048 RaftDataType = 2049 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mesh ¶
type Mesh interface {
raft.StreamLayer
// Listen starts a network listener for the mesh on the given address
Listen(listenAddr string) error
// GetOrConnectPeer returns a peer for the given address. If a peer has already been established,
// it will be returned, otherwise a new connection will be established
GetOrConnectPeer(address string, timeout time.Duration) (*Peer, error)
}
Mesh provides the networking layer to raft
Click to show internal directories.
Click to hide internal directories.