redis

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const InvalidQueueName = "InvalidQueue"

Variables

View Source
var DataTables = []RedisDatabase{FileTable}

Functions

func Close added in v0.6.1

func Close()

func Get added in v0.6.1

func Get(table RedisDatabase, key string,
	unmarshal func([]byte) (interface{}, error)) (value interface{}, err error)

func GetBytes added in v0.6.1

func GetBytes(key string, start int64, end int64) ([]byte, error)

Get file bytes `start` and `end` are inclusive FIXME: this API causes an extra memory copy, need to patch radix to fix it

func GetClient added in v0.6.1

func GetClient() (*redis.Client, error)

func Initialize

func Initialize()

func Invalid added in v0.6.1

func Invalid(table RedisDatabase, key string) (err error)

Publish the invalid message to other YIG instances through Redis

func PutClient added in v1.1.0

func PutClient(c *redis.Client)

func Remove added in v0.6.1

func Remove(table RedisDatabase, key string) (err error)

func Set added in v0.6.1

func Set(table RedisDatabase, key string, value interface{}) (err error)

func SetBytes added in v0.6.1

func SetBytes(key string, value []byte) (err error)

Set file bytes

Types

type RedisDatabase

type RedisDatabase int
const (
	UserTable RedisDatabase = iota
	BucketTable
	ObjectTable
	FileTable
	ClusterTable
)

func TableFromChannelName added in v1.1.0

func TableFromChannelName(name string) (r RedisDatabase, err error)

func (RedisDatabase) InvalidQueue

func (r RedisDatabase) InvalidQueue() string

func (RedisDatabase) String

func (r RedisDatabase) String() string

Jump to

Keyboard shortcuts

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