Documentation ¶
Index ¶
Constants ¶
View Source
const ( FileClient = "fileClient" CacheDir = "datacache" )
View Source
const (
READAHEAD_CHUNK = uint64(32 * 1024 * 1024)
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
func (*Buffer) ReInit ¶
func (b *Buffer) ReInit(r ReaderProvider) *Buffer
type BufferPool ¶
type BufferPool struct {
// contains filtered or unexported fields
}
func (*BufferPool) Init ¶
func (pool *BufferPool) Init(size int) *BufferPool
func (*BufferPool) MaybeGC ¶
func (pool *BufferPool) MaybeGC()
func (*BufferPool) RequestMBuf ¶
func (pool *BufferPool) RequestMBuf(size uint64, block bool, blockSize int) (buf []byte)
type DataCacheClient ¶
type DataCacheClient interface {
// contains filtered or unexported methods
}
func NewDataCache ¶
func NewDataCache(config Config) DataCacheClient
type ReadBuffer ¶
type ReadBuffer struct { Buffer *Buffer // contains filtered or unexported fields }
func (ReadBuffer) Init ¶
func (b ReadBuffer) Init(pool *BufferPool, blocksize int) *ReadBuffer
type ReadBufferMap ¶
type ReadBufferMap map[uint64]*ReadBuffer
type ReaderProvider ¶
type ReaderProvider func() (io.ReadCloser, error)
type Store ¶
type Store interface { NewReader(name string, length int, flags uint32, ufs ufs.UnderFileStorage, buffers ReadBufferMap, bufferPool *BufferPool, seqReadAmount uint64) Reader NewWriter(name string, length int, ufsFh ufs.FileHandle) Writer InvalidateCache(name string, length int) error }
func NewCacheStore ¶
Click to show internal directories.
Click to hide internal directories.