discovery

package
v0.0.0-...-7066845 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 3 Imported by: 0

README

服务发现

TODO

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 string, addr string) error
	Leave(name string) error
}

type Membership

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

func NewMembership

func NewMembership(h Handler, c 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