register

package
v1.6.8 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultHeartBeat  uint64 = 10
	DefaultRetryTimes        = 3
)

Functions

This section is empty.

Types

type DogRegister

type DogRegister interface {
	NewRegister(hosts []string, root, environ, group, service string)
	SetRootNode(node string) error
	GetRootNode() (root string)
	SetHeartBeat(heartBeat time.Duration)
	SetOffline(offline bool)
	Run(ip string, port int, weight uint64) error
	Close()
}

register server

type ZkRegister

type ZkRegister struct {
	// contains filtered or unexported fields
}

func (*ZkRegister) Close

func (z *ZkRegister) Close()

func (*ZkRegister) GetRootNode

func (z *ZkRegister) GetRootNode() (root string)

func (*ZkRegister) NewRegister

func (z *ZkRegister) NewRegister(hosts []string, root, environ, group, service string)

func (*ZkRegister) Run

func (z *ZkRegister) Run(ip string, port int, weight uint64) (err error)

func (*ZkRegister) SetHeartBeat

func (z *ZkRegister) SetHeartBeat(heartBeat time.Duration)

func (*ZkRegister) SetOffline

func (z *ZkRegister) SetOffline(offline bool)

func (*ZkRegister) SetRootNode

func (z *ZkRegister) SetRootNode(root string) (err error)

Jump to

Keyboard shortcuts

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