etcd

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: MIT Imports: 5 Imported by: 0

README

ETCD服务注册与发现模块

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdConfig

type EtcdConfig struct {
	Key       string   `yaml:"key"`
	Endpoints []string `yaml:"endpoints"`
}

type EtcdDiscover

type EtcdDiscover struct{}

func (*EtcdDiscover) GetServices

func (d *EtcdDiscover) GetServices(ctx context.Context, sn string) ([]*discov.Service, error)

func (EtcdDiscover) Watch

func (d EtcdDiscover) Watch(ctx context.Context) error

type EtcdRegister

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

func NewEtcdRegister

func NewEtcdRegister(eps []string, key, value string) *EtcdRegister

func (*EtcdRegister) Deregister

func (e *EtcdRegister) Deregister(ctx context.Context)

func (*EtcdRegister) Register

func (e *EtcdRegister) Register(ctx context.Context) error

Jump to

Keyboard shortcuts

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