Versions in this module Expand all Collapse all v0 v0.1.0 Nov 5, 2024 Changes in this version + const DefaultTTL + var ErrBatchRequestFailed = errors.New("batch request failed") + var ErrDisabled = errors.New("etcd is disabled") + var ErrInvalidBatchRequest = errors.New("invalid batch request") + var ErrSetDelete = errors.New("set-delete failed") + var ErrSetIfNotExist = errors.New("set-if-not-exists failed") + type ETCD struct + func New(options *Options, loader loader.Loader, zapLogger *zap.Logger, ...) (*ETCD, error) + func NewEmbeddded(options *Options, embedded *embed.Etcd, zapLogger *zap.Logger, ...) (*ETCD, error) + func (e *ETCD) Close() error + func (e *ETCD) Delete(ctx context.Context, key string) error + func (e *ETCD) DeleteAll(ctx context.Context, prefix string) error + func (e *ETCD) DeleteIf(ctx context.Context, key string, condition kvstore.Condition) error + func (e *ETCD) Exists(ctx context.Context, key string) (bool, error) + func (e *ETCD) Get(ctx context.Context, key string) ([]byte, uint64, error) + func (e *ETCD) GetAll(ctx context.Context, prefix string) (kvstore.Entries, error) + func (e *ETCD) GetAllKeys(ctx context.Context, prefix string) ([]string, error) + func (e *ETCD) GetBatch(ctx context.Context, keys ...string) (kvstore.Entries, error) + func (e *ETCD) GetFirst(ctx context.Context, prefix string) (*kvstore.Entry, error) + func (e *ETCD) GetLimit(ctx context.Context, key string, limit int64) (kvstore.Entries, error) + func (e *ETCD) Move(ctx context.Context, oldKey string, newKey string) error + func (e *ETCD) MoveReplace(ctx context.Context, oldKey string, newKey string, value []byte) error + func (e *ETCD) MoveReplaceIf(ctx context.Context, oldKey string, newKey string, value []byte, ...) error + func (e *ETCD) Set(ctx context.Context, key string, value []byte) error + func (e *ETCD) SetDelete(ctx context.Context, key string, value []byte, delete string) error + func (e *ETCD) SetEmpty(ctx context.Context, key string) error + func (e *ETCD) SetExpiry(ctx context.Context, key string, value []byte, ttl time.Duration) error + func (e *ETCD) SetIf(ctx context.Context, key string, value []byte, condition kvstore.Condition) error + func (e *ETCD) SetIfNotExist(ctx context.Context, key string, value []byte) error + func (e *ETCD) SetIfNotExistExpiry(ctx context.Context, key string, value []byte, ttl time.Duration) error + func (e *ETCD) SetKeepAlive(ctx context.Context, key string, value []byte) error + func (e *ETCD) Subscribe(ctx context.Context, prefix string, handler kvstore.SubscriptionHandler) error + type Options struct + Disabled bool + LogName string + ServiceName string + SrvDomain string