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) DeleteMultiple(ctx context.Context, keys []storage.Key) (_ storage.Items, err error)
- func (client *Client) Eval(ctx context.Context, script string, keys []string) (err error)
- func (client *Client) FlushDB(ctx context.Context) 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) IncrBy(ctx context.Context, key storage.Key, value int64) (err error)
- func (client *Client) Iterate(ctx context.Context, opts storage.IterateOptions, ...) (err error)
- func (client *Client) IterateWithoutLookupLimit(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) LookupLimit() int
- func (client *Client) Put(ctx context.Context, key storage.Key, value storage.Value) (err error)
- func (client *Client) SetLookupLimit(v int)
- type StaticIterator
Constants ¶
This section is empty.
Variables ¶
var ( // Error is a redis error. Error = errs.Class("redis error") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is the entrypoint into Redis.
func OpenClient ¶ added in v1.26.2
OpenClient returns a configured Client instance, verifying a successful connection to redis.
func OpenClientFrom ¶ added in v1.26.2
OpenClientFrom returns a configured Client instance from a redis address, verifying a successful connection to redis.
func (*Client) CompareAndSwap ¶ added in v0.16.0
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) DeleteMultiple ¶ added in v0.33.2
func (client *Client) DeleteMultiple(ctx context.Context, keys []storage.Key) (_ storage.Items, err error)
DeleteMultiple deletes keys ignoring missing keys.
func (*Client) Eval ¶ added in v1.7.1
Eval evaluates a Lua 5.1 script on Redis Server. This arguments can be accessed by Lua using the KEYS global variable in the form of a one-based array (so KEYS[1], KEYS[2], ...).
func (*Client) Get ¶
Get looks up the provided key from redis returning either an error or the result.
func (*Client) GetAll ¶
GetAll is the bulk method for gets from the redis data store. The maximum keys returned will be LookupLimit. If more than that is requested, an error will be returned.
func (*Client) IncrBy ¶ added in v0.24.0
IncrBy increments the value stored in key by the specified value.
func (*Client) Iterate ¶
func (client *Client) Iterate(ctx context.Context, opts storage.IterateOptions, fn func(context.Context, storage.Iterator) error) (err error)
Iterate iterates over items based on opts.
func (*Client) IterateWithoutLookupLimit ¶ added in v1.4.1
func (client *Client) IterateWithoutLookupLimit(ctx context.Context, opts storage.IterateOptions, fn func(context.Context, storage.Iterator) error) (err error)
IterateWithoutLookupLimit calls the callback with an iterator over the keys, but doesn't enforce default limit on opts.
func (*Client) List ¶
func (client *Client) List(ctx context.Context, first storage.Key, limit int) (_ storage.Keys, err error)
List returns either a list of keys for which boltdb has values or an error.
func (*Client) LookupLimit ¶ added in v0.31.0
LookupLimit returns the maximum limit that is allowed.
func (*Client) SetLookupLimit ¶ added in v0.31.0
SetLookupLimit sets the lookup limit.
type StaticIterator ¶ added in v0.34.1
StaticIterator implements an iterator over list of items.