Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("etcdwrapper: key not found")
)
Functions ¶
func GetEtcdClient ¶
func GetEtcdClient(ctx context.Context, certificates *Certificates, endpoints ...string) (*clientv3.Client, error)
GetEtcdClient returns an etcd client connected to the specified endpoints. If no endpoints are provided, endpoints are retrieved from the provided runtime config. If the runtime config does not list any endpoints, the default endpoint is used. The returned client should be closed when no longer needed, in order to avoid leaking GRPC client goroutines.
func WaitForEtcd ¶ added in v0.21.0
func WaitForEtcd(parentCtx context.Context, certificates *Certificates, endpoints ...string) error
Types ¶
type Certificates ¶
type Client ¶ added in v0.21.0
type Client interface { List(ctx context.Context, key string, rev int) ([]Value, error) Watch(ctx context.Context, key string, rev int) clientv3.WatchChan Get(ctx context.Context, key string) (Value, error) Put(ctx context.Context, key string, value []byte) error Create(ctx context.Context, key string, value []byte) error Update(ctx context.Context, key string, revision int64, value []byte) error Delete(ctx context.Context, key string, revision int64) error Compact(ctx context.Context, revision int64) (int64, error) Close() error }
func NewFromConfig ¶ added in v0.21.0
Click to show internal directories.
Click to hide internal directories.