Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDiscoveryService ¶
func NewDiscoveryService(dkvService serverpb.DKVServer, logger *zap.Logger, config *opts.DiscoveryServerConfig) (serverpb.DKVDiscoveryServer, error)
Types ¶
type Client ¶
type Client interface { StatusPropagator ClusterInfoGetter }
func NewDiscoveryClient ¶
type ClusterInfoGetter ¶
type ClusterInfoGetter interface { // GetClusterStatus get the status of nodes matching given database and vBucket GetClusterStatus(database string, vBucket string) ([]*serverpb.RegionInfo, error) }
ClusterInfoGetter is the interface to get status updates of cluster based on request criteria
type StatusPropagator ¶
type StatusPropagator interface { // propagate status updates of all regions in the node to the discovery system PropagateStatus() // register regions part of current node RegisterRegion(server serverpb.DKVDiscoveryNodeServer) // Sends one last status update before closing // This should ideally be called after closing all regions so that status update is correct Close() error }
StatusPropagator is the interface to propagate status updates of all regions in the node to the discovery system
Click to show internal directories.
Click to hide internal directories.