discovery

package
v0.0.0-...-2061cc3 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discovery

type Discovery interface {
	// Name gives the name of the discovery.
	Name() string

	// Start is about to start the discovery method
	// it returns a channel where the node will consume node addresses ("IP:NodeRaftPort") until the channel gets closed
	Start(nodeID string, nodePort int) (chan string, error)

	// Stop should stop the discovery method and all of its goroutines, it should close discovery channel returned in Start
	Stop()

	Search() (dest []string, err error)
}

Discovery gives the interface to perform automatic Node discovery

func NewKubernetesDiscovery

func NewKubernetesDiscovery(namespace, portName string, serviceLabels map[string]string) Discovery

func NewMdnsDiscovery

func NewMdnsDiscovery(serviceName string) Discovery

func NewStaticDiscovery

func NewStaticDiscovery(peers []string) Discovery

Jump to

Keyboard shortcuts

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