Documentation
¶
Index ¶
Constants ¶
View Source
const SlowRequest = time.Second * time.Duration(10)
Variables ¶
This section is empty.
Functions ¶
func NewPageReader ¶
func NewPageReader(p *Page) *pageReader
Types ¶
type CacheManager ¶
type CacheManager interface {
// contains filtered or unexported methods
}
type ChunkStore ¶
type ChunkStore interface {
NewReader(chunkid uint64, length int) Reader
NewWriter(chunkid uint64) Writer
Remove(chunkid uint64, length int) error
FillCache(chunkid uint64, length uint32) error
UsedMemory() int64
}
func NewCachedStore ¶
func NewCachedStore(storage object.ObjectStorage, config Config, registerer prometheus.Registerer) ChunkStore
NewCachedStore create a cached store.
type Config ¶
type Config struct {
CacheDir string
CacheMode os.FileMode
CacheSize int64
FreeSpace float32
AutoCreate bool
Compress string
MaxUpload int
MaxDeletes int
MaxRetries int
UploadLimit int64 // bytes per second
DownloadLimit int64 // bytes per second
Writeback bool
UploadDelay time.Duration
HashPrefix bool
BlockSize int
GetTimeout time.Duration
PutTimeout time.Duration
CacheFullBlock bool
BufferSize int
Readahead int
Prefetch int
}
Config contains options for cachedStore
type Controller ¶
type Page ¶
type Page struct {
Data []byte
// contains filtered or unexported fields
}
Page is a page with refcount
func NewOffPage ¶
Click to show internal directories.
Click to hide internal directories.