Documentation ¶
Index ¶
Constants ¶
View Source
const ( SEEK_SET int = 0 // seek relative to the origin of the file SEEK_CUR int = 1 // seek relative to the current offset SEEK_END int = 2 // seek relative to the end )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File implements io.Reader, and io.ReaderAt. It fetch blobs on the fly.
func NewFileRemote ¶
func NewFileRemote(ctx context.Context, bs BlobStore, meta *node.RawNode, ivs []*node.IndexValue, cache *lru.Cache) (f *File)
NewFileRemote creates a new File instance that will fetch chunks from the remote storage, and uses BlobStash as a indexer only
func (*File) PreloadChunks ¶
func (f *File) PreloadChunks()
PreloadChunks all the chunks in a goroutine
func (*File) PurgeCache ¶
PurgeCache purges the in-mem chunk cache
type IndexValue ¶
IndexValue represents a file chunk
Click to show internal directories.
Click to hide internal directories.