redis

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const InvalidQueueName = "InvalidQueue"

Variables

View Source
var (
	CacheCircuit *circuit.Circuit
)
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(ctx context.Context) (redigo.Conn, error)

func HashSum

func HashSum(ObjectName string) (string, error)

Get Object to HighWayHash for redis

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 Pool added in v0.6.1

func Pool() *redigo.Pool

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 (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