redis

package
v0.0.3-rc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const PipelineBatchSize = 10
View Source
const SerializeIntBase = 36

Variables

This section is empty.

Functions

func DeserializeByTag

func DeserializeByTag(i interface{}, typeTag string) (interface{}, error)

func SerializeByTag

func SerializeByTag(i interface{}, typeTag string) (s string, err error)

func SerializeByValue

func SerializeByValue(i interface{}) (string, error)

func SerializeRedisKey

func SerializeRedisKey(revisionID int, entityKey interface{}) (string, error)

Types

type DB

type DB struct {
	*redis.Client
}

func Open

func Open(opt *types.RedisOpt) *DB

func (*DB) Get

func (db *DB) Get(ctx context.Context, opt online.GetOpt) (dbutil.RowMap, error)

func (*DB) Import

func (db *DB) Import(ctx context.Context, opt online.ImportOpt) error

func (*DB) MultiGet

func (db *DB) MultiGet(ctx context.Context, opt online.MultiGetOpt) (map[string]dbutil.RowMap, error)

response: map[entity_key]map[feature_name]feature_value

func (*DB) Purge

func (db *DB) Purge(ctx context.Context, revisionID int) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL