Documentation
¶
Overview ¶
Package cluster manager is configured to be a Raft learner in all multi-raft groups Exactly one cluster manager instance is deployed to a CliftonDB cluster, and it only replicates configuration change messages.
A cluster manager provides partition discover mechanism which is used by routers in all nodes to receive most up-to-date routing information.
A cluster manager implements its own storage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NodeAlreadyExistsErr = errors.New("node already exists")
View Source
var NodeIdNonNilErr = errors.New("NodeId must be non nil")
Functions ¶
This section is empty.
Types ¶
type ClusterManagerDataStore ¶
type ClusterManagerDataStore struct {
// contains filtered or unexported fields
}
func NewClusterManagerDataStore ¶
func NewClusterManagerDataStore() *ClusterManagerDataStore
func (*ClusterManagerDataStore) Snapshot ¶
func (c *ClusterManagerDataStore) Snapshot() ([]byte, error)
type ClusterManagerService ¶
type ClusterManagerService struct { }
func NewClusterManagerService ¶
func NewClusterManagerService() (*ClusterManagerService, error)
func (ClusterManagerService) DeRegisterNode ¶
func (ClusterManagerService) DeRegisterNode(context.Context, *cluster_services.DeRegisterNodeReq) (*cluster_services.DeRegisterNodeRes, error)
func (ClusterManagerService) RegisterNode ¶
func (ClusterManagerService) RegisterNode(context.Context, *cluster_services.RegisterNodeReq) (*cluster_services.RegisterNodeRes, error)
type ClusterNode ¶
type ClusterNodeClient ¶
type ClusterNodeClient struct { NetworkAddress string *grpc.ClientConn cluster_services.ClusterNodeClient }
func NewClusterNodeClient ¶
func NewClusterNodeClient(address string) (*ClusterNodeClient, error)
func (*ClusterNodeClient) Disconnect ¶
func (c *ClusterNodeClient) Disconnect() error
type ClusterNodeTransportState ¶
type ClusterNodeTransportState struct { NodeId uint32 Client *ClusterNodeClient PendingRequests *RequestQueue MaxPendingRequest int NetworkAddress string }
type NodeTransport ¶
type NodeTransport struct {
// contains filtered or unexported fields
}
func NewNodeTransport ¶
func NewNodeTransport() *NodeTransport
func (*NodeTransport) AddNode ¶
func (t *NodeTransport) AddNode(node ClusterNode) error
func (*NodeTransport) RemoveNode ¶
func (t *NodeTransport) RemoveNode(nodeId uint32) error
func (*NodeTransport) SendToAll ¶
func (t *NodeTransport) SendToAll()
type RequestQueue ¶
type RequestQueue struct {
// contains filtered or unexported fields
}
func NewRequestQueue ¶
func NewRequestQueue() *RequestQueue
Click to show internal directories.
Click to hide internal directories.