Documentation ¶
Index ¶
Constants ¶
View Source
const ( ResultSuccess = 0 ResultError = 1 ResultNotFound = 2 )
View Source
const ( DummyStore = "ds" DummyCache = "dc" DummyCacheMissRatio = 50 // Miss ratio of cache, 10 means 10% )
Variables ¶
View Source
var ( // The session the S3 Downloader will use AWSSession = session.Must(session.NewSessionWithOptions(session.Options{ SharedConfigState: session.SharedConfigEnable, Config: aws.Config{Region: aws.String("us-east-1")}, })) )
View Source
var (
ErrNotSupported = errors.New("not supported")
)
View Source
var (
// Default to disable client pooling.
PoolSize = 1
)
Functions ¶
func CreateLog ¶
func CreateLog(opts map[string]interface{})
CreateLog Enabling evaluation log in client lib.
func ResetDummySizeRegistry ¶
func ResetDummySizeRegistry()
Types ¶
type ByteReader ¶
func NewByteReader ¶
func NewByteReader(b []byte) *ByteReader
func (*ByteReader) Close ¶
func (r *ByteReader) Close() error
func (*ByteReader) Len ¶
func (r *ByteReader) Len() int
func (*ByteReader) ReadAll ¶
func (r *ByteReader) ReadAll() ([]byte, error)
type Client ¶
type Client interface { EcSet(string, []byte, ...interface{}) (string, error) EcGet(string, ...interface{}) (string, infinistore.ReadAllCloser, error) Close() }
type Dummy ¶
type Dummy struct {
// contains filtered or unexported fields
}
func NewDummy ¶
NewDummy returns a new dummy client. bandwidth defined the bandwidth of the dummy client in B/s, 0 for unlimited.
func (Dummy) EcGet ¶
func (c Dummy) EcGet(key string, args ...interface{}) (string, infinistore.ReadAllCloser, error)
type DummyReadAllCloser ¶
type DummyReadAllCloser struct {
// contains filtered or unexported fields
}
func (*DummyReadAllCloser) Close ¶
func (r *DummyReadAllCloser) Close() error
func (*DummyReadAllCloser) Len ¶
func (r *DummyReadAllCloser) Len() int
func (*DummyReadAllCloser) ReadAll ¶
func (r *DummyReadAllCloser) ReadAll() ([]byte, error)
type File ¶
type File struct {
// contains filtered or unexported fields
}
func (File) EcGet ¶
func (c File) EcGet(key string, args ...interface{}) (string, infinistore.ReadAllCloser, error)
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
func NewRedisWithBackend ¶
func NewRedisWithBackend(backend redis.UniversalClient) *Redis
func (Redis) EcGet ¶
func (c Redis) EcGet(key string, args ...interface{}) (string, infinistore.ReadAllCloser, error)
type RedisClusterSlotsProvider ¶
func GenElasticCacheClusterSlotsProvider ¶
func GenElasticCacheClusterSlotsProvider(addrPattern string, nodes int, numSlots int) RedisClusterSlotsProvider
func GenRedisClusterSlotsProviderByAddresses ¶
func GenRedisClusterSlotsProviderByAddresses(addrs []string, numSlots int) RedisClusterSlotsProvider
type S3 ¶
type S3 struct {
// contains filtered or unexported fields
}
func (S3) EcGet ¶
func (c S3) EcGet(key string, args ...interface{}) (string, infinistore.ReadAllCloser, error)
Click to show internal directories.
Click to hide internal directories.