etcd

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2022 License: MIT Imports: 8 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL