Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GossipConfig ¶
type GossipConfig struct {
JoinList []string
Network NetworkConfig
DistributedStateDelegate memberlist.Delegate
}
type MultiNode ¶
type MultiNode interface {
Call(id uint64, f func(*grpc.ClientConn) error) error
Node(cluster string, config RaftConfig) Node
Shutdown() error
}
func NewMultiNode ¶
func NewMultiNode(config NodeConfig, dialer func(address string, opts ...grpc.DialOption) (*grpc.ClientConn, error), server *grpc.Server, logger *zap.Logger) MultiNode
type NetworkConfig ¶
func (NetworkConfig) AdvertizedAddress ¶
func (n NetworkConfig) AdvertizedAddress() string
type NodeConfig ¶
type NodeConfig struct {
ID uint64
ServiceName string
DataDirectory string
GossipConfig GossipConfig
RaftConfig RaftConfig
}
type NodeRPCServer ¶
type NodeRPCServer struct {
}
type RaftConfig ¶
type RaftConfig struct {
ExpectedNodeCount int
AppliedIndex uint64
DisableProposalForwarding bool
LeaderFunc func(context.Context) error
Network NetworkConfig
GetStateSnapshot func() ([]byte, error)
CommitApplier raft.CommitApplier
SnapshotApplier raft.SnapshotApplier
ConfChangeApplier raft.ConfChangeApplier
OnNodeRemoved func(id uint64, leader bool)
}
Click to show internal directories.
Click to hide internal directories.