Documentation ¶
Overview ¶
Package redis defines Store, a Redis driver that partially implements the Store interface defined in "github.com/gokv/store".
This package is a wrapper around "github.com/go-redis/redis".
Index ¶
- Variables
- type Store
- func (s Store) Add(_ context.Context, v json.Marshaler) (string, error)
- func (s Store) Close() error
- func (s Store) Get(_ context.Context, k string, v json.Unmarshaler) (bool, error)
- func (s Store) Ping(ctx context.Context) (err error)
- func (s Store) Set(_ context.Context, k string, v json.Marshaler) error
- func (s Store) SetWithDeadline(ctx context.Context, k string, v json.Marshaler, deadline time.Time) error
- func (s Store) SetWithTimeout(_ context.Context, k string, v json.Marshaler, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDuplicateKey = errors.New("duplicate key")
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (Store) Add ¶
Add persists a new object with a new UUIDv4 key. Err is non-nil in case of failure.
func (Store) Get ¶
Get returns the value corresponding the key, and a nil error. If no match is found, returns (false, nil).
Click to show internal directories.
Click to hide internal directories.