register

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: Apache-2.0 Imports: 7 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 {
	Endpoints   []string `json:"endpoints"`    // ETCD节点列表
	LeaseTtl    int64    `json:"lease_ttl"`    // 续租时间
	DialTimeout int64    `json:"dial_timeout"` // 超时时间
	NodeAddr    string   `json:"node_addr"`    // 缓存服务节点地址,列如:192.168.1.11
	NodeName    string   `json:"node_name"`    // 缓存服务节点名称,例如:node1
	Protocol    string   `json:"protocol"`     //协议.目前只支持http
	Port        string   `json:"port"`         //端口.默认:2020
}

注册 注册

type Server

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

func New

func New(config *Config) *Server

func (*Server) ListenLeaseRespChan

func (e *Server) ListenLeaseRespChan()

func (*Server) RegisterNode

func (e *Server) RegisterNode(name, addr string) error

func (*Server) RevokeLease

func (e *Server) RevokeLease() error

撤销租约

Jump to

Keyboard shortcuts

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