Documentation ¶
Overview ¶
Package redis is the redis database, implements storage.Backend interface.
Index ¶
- Constants
- type DB
- func (db *DB) ClearDeleted(ctx context.Context, cutoff time.Time)
- func (db *DB) Delete(ctx context.Context, id string) (err error)
- func (db *DB) Get(ctx context.Context, id string) (rec *databroker.Record, err error)
- func (db *DB) GetAll(ctx context.Context) (recs []*databroker.Record, err error)
- func (db *DB) List(ctx context.Context, sinceVersion string) (rec []*databroker.Record, err error)
- func (db *DB) Put(ctx context.Context, id string, data *anypb.Any) (err error)
- func (db *DB) Watch(ctx context.Context) <-chan struct{}
- type Option
Constants ¶
View Source
const Name = config.StorageRedisName
Name is the storage type name for redis backend.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB wraps redis conn to interact with redis server.
func (*DB) ClearDeleted ¶
ClearDeleted clears all the currently deleted records older than the given cutoff.
func (*DB) List ¶
List retrieves all records since given version.
"version" is in hex format, invalid version will be treated as 0.
Click to show internal directories.
Click to hide internal directories.