Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdRegistry ¶
type EtcdRegistry struct {
// contains filtered or unexported fields
}
EtcdRegistry registers to etcd
func NewEtcdRegistry ¶
func NewEtcdRegistry(option Option) (r *EtcdRegistry, err error)
NewEtcdRegistry creates EtcdRegistry
func (*EtcdRegistry) Err ¶
func (r *EtcdRegistry) Err() error
Err returns the error occurred during RegisterLoop
func (*EtcdRegistry) RegisterLoop ¶
func (r *EtcdRegistry) RegisterLoop()
RegisterLoop keepalives the key in a loop until an error occur or EtcdRegistry be closed
type EtcdWatcher ¶
type EtcdWatcher struct {
// contains filtered or unexported fields
}
EtcdWatcher models after grpc.naming.Watcher
func NewEtcdWatcher ¶
func NewEtcdWatcher(registryDir, serviceName string, endpoints []string) (w *EtcdWatcher, err error)
NewEtcdWatcher creates EtcdWatcher
func (*EtcdWatcher) Close ¶
func (w *EtcdWatcher) Close()
Close cancels the in-flight etcd transaction
Click to show internal directories.
Click to hide internal directories.