registry

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

README

Registry 服务注册与发现组件

  • Register 服务注册
  • Unregister 服务注销

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func DialTimeout

func DialTimeout(timeout int) Option

func WithEndPoints

func WithEndPoints(endpoints ...string) Option

type Options

type Options struct {
	Endpoints   []string
	DialTimeout int
	Logger      *zap.Logger
}

func DefaultOptions

func DefaultOptions() *Options

type Registry

type Registry interface {

	// Register 向注册中心注册服务器
	Register(*runtime.ServiceDesc) error

	// Unregister 注销已注册的服务
	Unregister() error

	// GetServices 获取已注册的服务实例的列表
	GetServices() ([]*runtime.ServiceDesc, error)
}

Registry 服务注册器

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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