registry

package
v0.0.0-...-e0f38f0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultHeartBeat = 5 // 默认健康上报间隔

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Token       string // Token 令牌
	Namespace   string // 命名空间
	ServiceName string // 服务名称
	IP          string // 服务IP
	Port        int    // 服务端口
	Weight      int    // 权重
	Metadata    string // 元数据
	HeartBeat   int    // 健康上报间隔,单位:秒
}

type Registry

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

func NewRegistry

func NewRegistry(cfg *Config) *Registry

func (*Registry) Deregister

func (s *Registry) Deregister() error

Deregister 服务注销

func (*Registry) Register

func (s *Registry) Register() error

Register 服务注册

Jump to

Keyboard shortcuts

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