registry

package
v0.0.0-...-1a2806f Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ActionExpire expire action
	ActionExpire = "EXPIRE"
	//ActionPut put action
	ActionPut = "PUT"
	//ActionDel del action
	ActionDel = "DELETE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IRegistry

type IRegistry interface {
	// Register 注册service地址到ETCD组件中
	Register(serviceKey string, val string, interval time.Duration, ttl time.Duration)
	// WithAlive 创建租约
	WithAlive(name string, addr string, ttl int64) error
	// UnRegister remove service from etcd
	UnRegister(serviceKey string)
	//Watcher 接收数据信息
	Watcher(serviceKey string, callback func(action string, key, val []byte))

	// NewResolver initialize an etcd client
	NewResolver(etcdAddr string) resolver.Builder
}

IRegistry services discovery interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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