etcdv3

package
Version: v0.0.0-...-3481ce3 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegistry

func NewRegistry(ops ...register.Option) register.Register

NewRegistry 创建一个etcdv3服务注册中间件

Types

type EtcdV3

type EtcdV3 struct {
	Options *register.Options // 注册服务配置
	// contains filtered or unexported fields
}

EtcdV3 注册服务到etcd v3 api的服务注册中间件

func (*EtcdV3) Build

Build grpc resolver接口需要 - 创建一个服务注册中心中间件

func (*EtcdV3) Close

func (p *EtcdV3) Close()

Close 关闭注册解析器

func (*EtcdV3) GetBuilder

func (p *EtcdV3) GetBuilder() resolver.Builder

GetBuilder 获取grpc服务注册Builder对象

func (*EtcdV3) GetResolver

func (p *EtcdV3) GetResolver() resolver.Resolver

GetResolver 获取客户端发现 grpc Resolver对象

func (*EtcdV3) Register

func (p *EtcdV3) Register(n *register.Node) error

Register 注册一个服务

func (*EtcdV3) ResolveNow

func (p *EtcdV3) ResolveNow(rn resolver.ResolveNowOption)

ResolveNow 什么也不做

func (*EtcdV3) Scheme

func (p *EtcdV3) Scheme() string

Scheme 相当于服务分类名 - 服务注册根路径

func (*EtcdV3) UnRegister

func (p *EtcdV3) UnRegister(n *register.Node) error

UnRegister 取消注册一个服务

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL