discovery

package
v0.0.0-...-5536289 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: GPL-3.0 Imports: 4 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(name, addr string) error
	Leave(name string) error
}

type Membership

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

func New

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

func (*Membership) Leave

func (m *Membership) Leave() error

func (*Membership) Members

func (m *Membership) Members() []serf.Member

Jump to

Keyboard shortcuts

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