service_discovery

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: Apache-2.0 Imports: 1 Imported by: 1

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 initializes the plugin: registers some internal data structures, clients etc.
	Initialize() error

	// SetConfig registers plugin configuration
	SetConfig(c map[string]interface{}) error

	// SetLogger sets an appropriate
	SetLogger(l *log.Logger)

	// Register registers this node to a service discovery directory.
	Register() error

	// Deregister removes this node from a service discovery directory.
	Deregister() error

	// DiscoverPeers returns a list of known Olric nodes.
	DiscoverPeers() ([]string, error)

	// Close stops underlying goroutines, if there is any. It should be a blocking call.
	Close() error
}

ServiceDiscovery is an interface that defines a unified API for service discovery plugins.

Jump to

Keyboard shortcuts

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