Documentation
¶
Index ¶
- type Node
- type Option
- func WithClusterID(cid types.ClusterID) Option
- func WithExecutable(executable string) Option
- func WithLogDir(logDir string) Option
- func WithLogger(logger *zap.Logger) Option
- func WithNodeName(name string) Option
- func WithPeers(peers []string) Option
- func WithRPCAddr(rpcAddr string) Option
- func WithRaftDir(raftDir string) Option
- func WithRaftURL(raftURL string) Option
- func WithReplicationFactor(replicationFactor int) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents a metadata repository node.
func (*Node) RPCAddress ¶
RPCAddress returns an address for RPC communication.
func (*Node) ResetPeers ¶
ResetPeers updates peer nodes for Raft.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option configures a Node for metadata repository.
func WithClusterID ¶
WithClusterID sets a cluster ID.
func WithExecutable ¶
WithExecutable sets an executable for the metadata repository.
func WithNodeName ¶
WithNodeName sets a node name. Users should select a unique name.
func WithRPCAddr ¶
WithRPCAddr sets an address for RPC communication.
func WithRaftDir ¶
WithRaftDir sets a directory for the Raft data.
func WithReplicationFactor ¶
WithReplicationFactor sets replication factor.
Click to show internal directories.
Click to hide internal directories.