Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdDriver ¶
type EtcdDriver struct {
// contains filtered or unexported fields
}
func NewEtcdDriver ¶
func NewEtcdDriver(config *clientv3.Config) (*EtcdDriver, error)
NewEtcdDriver ...
func (*EtcdDriver) GetServiceNodeList ¶
func (e *EtcdDriver) GetServiceNodeList(serviceName string) ([]string, error)
GetServiceNodeList get service notes
func (*EtcdDriver) Ping ¶
func (e *EtcdDriver) Ping() error
func (*EtcdDriver) RegisterServiceNode ¶
func (e *EtcdDriver) RegisterServiceNode(serviceName string) (string, error)
RegisterServiceNode register a node to service
func (*EtcdDriver) SetHeartBeat ¶
func (e *EtcdDriver) SetHeartBeat(nodeID string)
func (*EtcdDriver) SetTimeout ¶
func (e *EtcdDriver) SetTimeout(timeout time.Duration)
SetTimeout set etcd lease timeout
Click to show internal directories.
Click to hide internal directories.