rd

package
v1.7.15-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: MIT Imports: 15 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.ServerConfig) (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