etcd

package
v3.6.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: Apache-2.0 Imports: 10 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(cli *etcdv3.Client) (*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