discov

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PAUSE = "pause"
	START = "start"
	EXIT  = "exit"
)

Variables

This section is empty.

Functions

func GetPrefix

func GetPrefix(serviceName string) string

Types

type Builder

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

func NewBuilder

func NewBuilder(client *clientv3.Client, domain string) *Builder

NewBuilder TODO 将 client,domain 用 options 包裹起来,以统一写法

func (*Builder) Build

func (*Builder) Scheme

func (b *Builder) Scheme() string

type Register

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

func NewRegister

func NewRegister(client *clientv3.Client) *Register

func (*Register) Discov

func (r *Register) Discov(serviceName string, port string) <-chan error

Discov 服务注册

func (*Register) Exit

func (r *Register) Exit()

func (*Register) Pause

func (r *Register) Pause()

func (*Register) Start

func (r *Register) Start()

type Resolver

type Resolver struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Resolver) Close

func (r *Resolver) Close()

func (*Resolver) ResolveNow

func (r *Resolver) ResolveNow(resolver.ResolveNowOptions)

func (*Resolver) Update

func (r *Resolver) Update(addrs []string)

Jump to

Keyboard shortcuts

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