discover

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Client *clientv3.Client
)

Functions

func GetConf

func GetConf(key string)

GetConf Get config from etcd

func NewClient

func NewClient()

New ETCD V3 Client

Types

type Cluster

type Cluster struct {
	// contains filtered or unexported fields
}
var (
	ServiceCluster *Cluster
)

func NewCluster

func NewCluster(endpoints []string) *Cluster

func (*Cluster) WatchNodes

func (cluster *Cluster) WatchNodes(id string, ctx context.Context)

type Service

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

func NewService

func NewService(instance *service.Instance) (*Service, error)

func (*Service) Register

func (service *Service) Register(ttlSecond int64) error

Register service

func (*Service) Stop

func (service *Service) Stop()

Stop service

Jump to

Keyboard shortcuts

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