Documentation ¶
Index ¶
- func NewResolver(conf config.EtcdCliConf) string
- type Builder
- type Register
- func (r *Register) Deregister() error
- func (r *Register) GetFullAddress() string
- func (r *Register) GetServiceAddress() string
- func (r *Register) GetServiceName() string
- func (r *Register) Register() error
- func (r *Register) SetInterval(interval time.Duration)
- func (r *Register) SetLeaseTime(leaseTime int64)
- type Resolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResolver ¶
func NewResolver(conf config.EtcdCliConf) string
NewResolver initialize an etcd client
Types ¶
type Builder ¶
type Register ¶
type Register struct {
// contains filtered or unexported fields
}
Register ...
func NewRegister ¶
func NewRegister(conf config.EtcdSrvConf) (*Register, error)
NewRegister naming.Update{Op: naming.Add, Addr: "1.2.3.4", Metadata: "..."})
func (*Register) Deregister ¶
Deregister remove service from etcd
func (*Register) GetFullAddress ¶
func (*Register) GetServiceAddress ¶
func (*Register) GetServiceName ¶
func (*Register) Register ¶
Register register service with name as prefix to etcd, multi etcd addr should use ; to split
func (*Register) SetInterval ¶
func (*Register) SetLeaseTime ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func (*Resolver) Close ¶
func (r *Resolver) Close()
It's just a hint, resolver can ignore this if it's not necessary.
func (*Resolver) ResolveNow ¶
func (r *Resolver) ResolveNow(opt resolver.ResolveNowOption)
ResolveNow will be called by gRPC to try to resolve the target name again. It's just a hint, resolver can ignore this if it's not necessary.
It could be called multiple times concurrently.
Click to show internal directories.
Click to hide internal directories.