Documentation ¶
Index ¶
- func IsInvalidConfig(err error) bool
- func IsMultipleValuesFound(err error) bool
- type Config
- type Service
- func (s *Service) Delete(ctx context.Context, k microstorage.K) error
- func (s *Service) Exists(ctx context.Context, k microstorage.K) (bool, error)
- func (s *Service) List(ctx context.Context, k microstorage.K) ([]microstorage.KV, error)
- func (s *Service) Put(ctx context.Context, kv microstorage.KV) error
- func (s *Service) Search(ctx context.Context, k microstorage.K) (microstorage.KV, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
func IsMultipleValuesFound ¶
IsMultipleValuesFound asserts multipleValuesError.
Types ¶
type Config ¶
type Config struct { // Dependencies. EtcdClient *clientv3.Client // Settings. Prefix string Timeout time.Duration }
Config represents the configuration used to create a etcd service.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig provides a default configuration to create a new etcd service by best effort.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the etcd service.
func (*Service) List ¶
func (s *Service) List(ctx context.Context, k microstorage.K) ([]microstorage.KV, error)
func (*Service) Search ¶
func (s *Service) Search(ctx context.Context, k microstorage.K) (microstorage.KV, error)
Click to show internal directories.
Click to hide internal directories.