register_discover

package
v1.5.27 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegisterDiscover

type RegisterDiscover interface {
	Quit() error
	AddObserver(event chan types.RoleType) error
	IsMaster() (bool, *types.ServerInfo, error)
	GetServers() ([]*types.ServerInfo, error)
	IsServerIP(ip string) (bool, error)
	Run() error
}

RegisterDiscover takes responsibility to register and elect a master, also watching the clusters change to notify the RoleChangeEvent.

func NewRegisterDiscover

func NewRegisterDiscover(conf *config.GatewayConfig) (RegisterDiscover, error)

NewRegisterDiscover : return server discover object

Jump to

Keyboard shortcuts

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