Documentation ¶
Index ¶
- func AzureDownloadBlock(blockIndex int64) (err error, b []byte)
- func AzureSetup(urlString string, urlPrivate bool, identity common.Identity) error
- func AzureUploadBlock(blockIndex int64, b []byte) (err error)
- func ClearCache() error
- func DownloadBlock(blockIndex int64) ([]byte, error)
- func GetBlock(blockIndex int64) (error, []byte)
- func GetBlockFromCache(blockIndex int64) ([]byte, error)
- func GetBlockSize() int64
- func GetBytes(offset int64, to int64) (error, []byte)
- func GetFileSize() int64
- func InitializeCache(blockSize int, numBlocks int, readWrite bool) error
- func IsReadWrite() bool
- func LocalDownloadBlock(blockIndex int64) (err error, b []byte)
- func LocalSetup(filePath string, readWrite bool) error
- func LocalUploadBlock(blockIndex int64, data []byte) error
- func SetBlock(blockIndex int64, blockOffset int64, data []byte) error
- func SetBytes(offset int64, data []byte) error
- type FileManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AzureDownloadBlock ¶
func AzureSetup ¶
func AzureUploadBlock ¶
func ClearCache ¶
func ClearCache() error
This clears cache. It is only needed for testing purposes.
func DownloadBlock ¶
Utility function to download the block
func GetBlockFromCache ¶
Utility function to check if the block is in the cache and get it if it is
func GetBlockSize ¶
func GetBlockSize() int64
func GetFileSize ¶
func GetFileSize() int64
func IsReadWrite ¶
func IsReadWrite() bool
func LocalDownloadBlock ¶
func LocalSetup ¶
func LocalUploadBlock ¶
Types ¶
type FileManager ¶
type FileManager struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.