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 WANMode bool DistributedStateDelegate memberlist.Delegate NodeEventDelegate membership.Recorder }
type MultiNode ¶
type MultiNode interface { Call(id uint64, f func(*grpc.ClientConn) error) error Gossip() membership.Pool 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 Version string GossipConfig GossipConfig RaftConfig RaftConfig }
type NodeRPCServer ¶
type NodeRPCServer struct { }
type RaftConfig ¶
type RaftConfig struct { ExpectedNodeCount int AppliedIndex uint64 DisableProposalForwarding bool CheckQuorum bool LeaderFunc func(context.Context, raft.RaftStatusProvider) error Network NetworkConfig GetStateSnapshot func() ([]byte, error) CommitApplier raft.CommitApplier SnapshotApplier raft.SnapshotApplier ConfChangeApplier raft.ConfChangeApplier OnNodeRemoved func(id uint64, leader bool) OnNodeAdded func(id uint64, leader bool) }
Click to show internal directories.
Click to hide internal directories.