Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrExists = errors.New("Key exists") ErrNotExists = errors.New("Key and or Revision does not exists") )
Functions ¶
Types ¶
type Client ¶
type Client interface { Get(ctx context.Context, key string) (*KeyValue, error) // Similar to get but looks for "like 'key%'" List(ctx context.Context, key string) ([]*KeyValue, error) // Should return ErrExists on conflict Create(ctx context.Context, key string, value []byte, ttl uint64) (*KeyValue, error) // Should return ErrNotExists on conflict Delete(ctx context.Context, key string) (*KeyValue, error) // Should return ErrNotExist DeleteVersion(ctx context.Context, key string, revision int64) error // Should return ErrNotExists, if key doesn't exist it should be created UpdateOrCreate(ctx context.Context, key string, value []byte, revision int64, ttl uint64) (*KeyValue, error) Watch(ctx context.Context, key string) ([]*KeyValue, WatchChan, error) }
type WatchChan ¶
type WatchChan <-chan WatchResponse
type WatchResponse ¶
type WatchResponse struct { Events []Event // contains filtered or unexported fields }
func WatchResponseError ¶
func WatchResponseError(err error) WatchResponse
func (*WatchResponse) Err ¶
func (wr *WatchResponse) Err() error
Click to show internal directories.
Click to hide internal directories.