registry

package
v0.0.0-...-3a25d02 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	NodeName       string
	BindAddr       string
	Tags           map[string]string
	StartJoinAddrs []string
}

type Handler

type Handler interface {
	Join(id, addr string) error
	Leave(id string) error
}

type Registry

type Registry struct {
	Config
	// contains filtered or unexported fields
}

func New

func New(handler Handler, config Config) (*Registry, error)

func (*Registry) Leave

func (r *Registry) Leave() error

Leave tells this member to leave the cluster.

func (*Registry) Members

func (r *Registry) Members() []serf.Member

Members returns a point-in-time snapshot of the cluster's members.

Jump to

Keyboard shortcuts

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