Documentation
¶
Overview ¶
Package service_discovery provides ServiceDiscovery interface for plugins
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceDiscovery ¶
type ServiceDiscovery interface {
// Initialize prepares the service discovery plugin for use and ensures it is ready for further operations.
Initialize() error
// SetConfig sets the configuration for the service discovery plugin using the provided map of settings.
SetConfig(c map[string]interface{}) error
// SetLogger assigns a custom logger to the service discovery instance for logging operations.
SetLogger(l *log.Logger)
// Register registers the current node in the service discovery directory, enabling it to participate in the cluster.
Register() error
// Deregister removes the current node from the service discovery directory and stops its participation in the cluster.
Deregister() error
// DiscoverPeers retrieves a list of available peers in the cluster and returns their addresses or an error if any occurs.
DiscoverPeers() ([]string, error)
// Close gracefully terminates all operations and releases resources associated with the service discovery instance.
Close() error
}
ServiceDiscovery represents an interface for discovering, registering nodes within an Olric cluster.
Click to show internal directories.
Click to hide internal directories.