Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GossipConfig ¶ added in v1.2.0
type GossipConfig struct { JoinList []string Network NetworkConfig }
type MultiNode ¶ added in v1.3.0
type MultiNode interface { Node(cluster string, config RaftConfig) Node Shutdown() error }
func NewMultiNode ¶ added in v1.3.0
func NewMultiNode(config NodeConfig, dialer func(address string, opts ...grpc.DialOption) (*grpc.ClientConn, error), server *grpc.Server, logger *zap.Logger) MultiNode
type NetworkConfig ¶ added in v1.2.0
func (NetworkConfig) AdvertizedAddress ¶ added in v1.2.0
func (n NetworkConfig) AdvertizedAddress() string
type Node ¶ added in v1.2.0
type Node interface { Run(context.Context) RunFromAppliedIndex(ctx context.Context, idx uint64) Shutdown() error Apply(context.Context, []byte) error Ready() <-chan struct{} Call(id uint64, f func(*grpc.ClientConn) error) error Index() uint64 }
func NewNode ¶ added in v1.2.0
func NewNode(config NodeConfig, dialer func(address string, opts ...grpc.DialOption) (*grpc.ClientConn, error), server *grpc.Server, logger *zap.Logger) Node
type NodeConfig ¶ added in v1.2.0
type NodeConfig struct { ID uint64 ServiceName string DataDirectory string GossipConfig GossipConfig RaftConfig RaftConfig }
type NodeRPCServer ¶ added in v1.2.0
type NodeRPCServer struct { }
type RaftConfig ¶ added in v1.2.0
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 }
Click to show internal directories.
Click to hide internal directories.