redis

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 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

func Close()

func Get

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

func GetBytes

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

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

func Initialize

func Initialize()

func Invalid

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

Publish the invalid message to other YIG instances through Redis

func PutClient

func PutClient(c *redis.Client)

func Remove

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

func Set

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

func SetBytes

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

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