service_discovery

package
v0.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL