Documentation ¶
Index ¶
- type Option
- type RegisterEtcd
- func (r *RegisterEtcd) Deregister(ctx context.Context, service *register.ServiceInstance) error
- func (r *RegisterEtcd) GetService(ctx context.Context, serviceName string) ([]*register.ServiceInstance, error)
- func (r *RegisterEtcd) Register(ctx context.Context, service *register.ServiceInstance) error
- func (r *RegisterEtcd) Watch(ctx context.Context, serviceName string) (register.IWatcher, error)
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*option)
func WithCancelCtx ¶
func WithCancelCtx(ctx context.Context, cancel context.CancelFunc) Option
func WithMaxRetry ¶
func WithPassword ¶ added in v0.1.10
func WithRegisterServiceUri ¶
func WithUsername ¶ added in v0.1.10
type RegisterEtcd ¶
type RegisterEtcd struct {
// contains filtered or unexported fields
}
func NewRegisterEtcd ¶
func NewRegisterEtcd(options ...Option) (*RegisterEtcd, error)
func (*RegisterEtcd) Deregister ¶
func (r *RegisterEtcd) Deregister(ctx context.Context, service *register.ServiceInstance) error
Deregister 取消注册
func (*RegisterEtcd) GetService ¶
func (r *RegisterEtcd) GetService(ctx context.Context, serviceName string) ([]*register.ServiceInstance, error)
GetService 从 etcd 中获取服务
func (*RegisterEtcd) Register ¶
func (r *RegisterEtcd) Register(ctx context.Context, service *register.ServiceInstance) error
Register 注册
Click to show internal directories.
Click to hide internal directories.