Documentation ¶
Index ¶
- Constants
- func NewETCDRegister(opts ...Option) (discov.Discovery, error)
- type Option
- type Options
- type Register
- func (r *Register) AddListener(ctx context.Context, f func())
- func (r *Register) GetService(ctx context.Context, name string) *discov.Service
- func (r *Register) Init(ctx context.Context) error
- func (r *Register) KeepAlive(ctx context.Context, service *registerService)
- func (r *Register) Name() string
- func (r *Register) NotifyListeners()
- func (r *Register) Register(ctx context.Context, service *discov.Service)
- func (r *Register) UnRegister(ctx context.Context, service *discov.Service)
Constants ¶
View Source
const KeyPrefix = "tiger/tgrpc"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(o *Options)
定义一系列修改options的方法,作为插销,后续一个个运行
func WithDialTimeout ¶
func WithEndpoints ¶
func WithKeepAliveInterval ¶
type Register ¶
type Register struct { Options // etcd的一些信息 // contains filtered or unexported fields }
Register
func (*Register) AddListener ¶
func (*Register) GetService ¶
这里会更新一下 downServices
func (*Register) Name ¶
---------------------------------------------- 以下Register实现Discovery ----------------------------------------------
func (*Register) NotifyListeners ¶
func (r *Register) NotifyListeners()
Click to show internal directories.
Click to hide internal directories.