etcd

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 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 Driver

type Driver struct {
	// contains filtered or unexported fields
}

func NewDriver

func NewDriver(cli *clientv3.Client) (*Driver, error)

NewDriver 新建etcd的驱动

func NewEtcdDriver

func NewEtcdDriver(config *clientv3.Config) (*Driver, error)

NewEtcdDriver ...

func (*Driver) GetServiceNodeList

func (d *Driver) GetServiceNodeList(serviceName string) ([]string, error)

GetServiceNodeList get service notes

func (*Driver) Ping

func (d *Driver) Ping() error

func (*Driver) RegisterServiceNode

func (d *Driver) RegisterServiceNode(serviceName string) (string, error)

RegisterServiceNode register a node to service

func (*Driver) SetHeartBeat

func (d *Driver) SetHeartBeat(nodeID string)

func (*Driver) SetTimeout

func (d *Driver) 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