etcdutil

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEtcdKVGet         = coderr.NewCodeError(coderr.Internal, "etcd KV get failed")
	ErrEtcdKVGetResponse = coderr.NewCodeError(coderr.Internal, "etcd invalid get value response must only one")
	ErrEtcdKVPut         = coderr.NewCodeError(coderr.Internal, "etcd KV put failed")
	ErrEtcdKVDelete      = coderr.NewCodeError(coderr.Internal, "etcd KV delete failed")
)

Functions

func CleanConfig

func CleanConfig(cfg *embed.Config)

CleanConfig is used to clean the etcd data for the unit test purpose.

func NewTestSingleConfig

func NewTestSingleConfig() *embed.Config

NewTestSingleConfig is used to create an etcd config for the unit test purpose.

Types

type EtcdLeaderGetter

type EtcdLeaderGetter interface {
	EtcdLeaderID() uint64
}

type LeaderGetterWrapper

type LeaderGetterWrapper struct {
	Server *etcdserver.EtcdServer
}

func (*LeaderGetterWrapper) EtcdLeaderID

func (w *LeaderGetterWrapper) EtcdLeaderID() uint64

Jump to

Keyboard shortcuts

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