Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveRemoteNodes ¶ added in v1.25.15
func ResolveRemoteNodes(addrResolver resolver.NodeToAddress, serverPortMap map[string]int) []string
ResolveRemoteNodes returns a list of remoteNodes addresses resolved using addrResolver. The nodes id used are taken from serverPortMap keys and ports from the values
Types ¶
type Bootstrapper ¶
type Bootstrapper struct {
// contains filtered or unexported fields
}
Bootstrapper is used to bootstrap this node by attempting to join it to a RAFT cluster.
func NewBootstrapper ¶
func NewBootstrapper(peerJoiner PeerJoiner, raftID string, raftAddr string, voter bool, r resolver.NodeToAddress, isStoreReady func() bool) *Bootstrapper
NewBootstrapper constructs a new bootsrapper
type Joiner ¶ added in v1.25.15
type Joiner struct {
// contains filtered or unexported fields
}
func NewJoiner ¶ added in v1.25.15
func NewJoiner(peerJoiner PeerJoiner, localNodeID string, localRaftAddr string, voter bool) *Joiner
NewJoiner returns a *Joiner configured with localNodeID, localRaftAddr and voter.
type PeerJoiner ¶ added in v1.25.15
type PeerJoiner interface { Join(_ context.Context, leaderAddr string, _ *cmd.JoinPeerRequest) (*cmd.JoinPeerResponse, error) Notify(_ context.Context, leaderAddr string, _ *cmd.NotifyPeerRequest) (*cmd.NotifyPeerResponse, error) }
PeerJoiner is the interface we expect to be able to talk to the other peers to either Join or Notify them
Click to show internal directories.
Click to hide internal directories.