Documentation ¶
Index ¶
- Constants
- Variables
- func Close()
- func Get(table RedisDatabase, key string, unmarshal func([]byte) (interface{}, error)) (value interface{}, err error)
- func GetBytes(key string, start int64, end int64) ([]byte, error)
- func GetClient(ctx context.Context) (redigo.Conn, error)
- func HashSum(ObjectName string) (string, error)
- func Initialize()
- func Invalid(table RedisDatabase, key string) (err error)
- func Pool() *redigo.Pool
- func Remove(table RedisDatabase, key string) (err error)
- func Set(table RedisDatabase, key string, value interface{}) (err error)
- func SetBytes(key string, value []byte) (err error)
- type RedisDatabase
Constants ¶
View Source
const InvalidQueueName = "InvalidQueue"
Variables ¶
View Source
var (
CacheCircuit *circuit.Circuit
)
View Source
var DataTables = []RedisDatabase{FileTable}
View Source
var MetadataTables = []RedisDatabase{UserTable, BucketTable, ObjectTable, ClusterTable}
Functions ¶
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
Get file bytes `start` and `end` are inclusive FIXME: this API causes an extra memory copy, need to patch radix to fix it
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 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)
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
Click to show internal directories.
Click to hide internal directories.