Documentation ¶
Index ¶
- Variables
- func CleanConfig(cfg *embed.Config)
- func Get(ctx context.Context, client *clientv3.Client, key string) (string, error)
- func List(ctx context.Context, client *clientv3.Client, prefix string) ([]string, error)
- func NewTestSingleConfig() *embed.Config
- func Scan(ctx context.Context, client *clientv3.Client, startKey, endKey string, ...) error
- type CloseFn
- type EtcdLeaderGetter
- type LeaderGetterWrapper
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") ErrEtcdKVGetNotFound = coderr.NewCodeError(coderr.Internal, "etcd KV get value not found") )
Functions ¶
func CleanConfig ¶
CleanConfig is used to clean the etcd data for the unit test purpose.
func NewTestSingleConfig ¶
NewTestSingleConfig is used to create an etcd config for the unit test purpose.
Types ¶
type EtcdLeaderGetter ¶
type LeaderGetterWrapper ¶
type LeaderGetterWrapper struct {
Server *etcdserver.EtcdServer
}
func (*LeaderGetterWrapper) EtcdLeaderID ¶
func (w *LeaderGetterWrapper) EtcdLeaderID() (uint64, error)
Click to show internal directories.
Click to hide internal directories.