Documentation ¶
Index ¶
- Variables
- type Client
- func (client *Client) Close() error
- func (client *Client) CompareAndSwap(ctx context.Context, key storage.Key, oldValue, newValue storage.Value) (err error)
- func (client *Client) Delete(ctx context.Context, key storage.Key) (err error)
- func (client *Client) Get(ctx context.Context, key storage.Key) (_ storage.Value, err error)
- func (client *Client) GetAll(ctx context.Context, keys storage.Keys) (_ storage.Values, err error)
- func (client *Client) Iterate(ctx context.Context, opts storage.IterateOptions, ...) (err error)
- func (client *Client) List(ctx context.Context, first storage.Key, limit int) (_ storage.Keys, err error)
- func (client *Client) Put(ctx context.Context, key storage.Key, value storage.Value) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Error = errs.Class("cockroachkv error")
Error is the default postgreskv errs class
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the entrypoint into a cockroachkv data store
func (*Client) CompareAndSwap ¶
func (client *Client) CompareAndSwap(ctx context.Context, key storage.Key, oldValue, newValue storage.Value) (err error)
CompareAndSwap atomically compares and swaps oldValue with newValue
func (*Client) GetAll ¶
GetAll finds all values for the provided keys (up to storage.LookupLimit). If more keys are provided than the maximum, an error will be returned.
func (*Client) Iterate ¶
func (client *Client) Iterate(ctx context.Context, opts storage.IterateOptions, fn func(context.Context, storage.Iterator) error) (err error)
Iterate calls the callback with an iterator over the keys.
Click to show internal directories.
Click to hide internal directories.