filemanager

package
v0.0.0-...-3739264 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AzureDownloadBlock

func AzureDownloadBlock(blockIndex int64) (err error, b []byte)

func AzureSetup

func AzureSetup(urlString string, urlPrivate bool, identity common.Identity) error

func AzureUploadBlock

func AzureUploadBlock(blockIndex int64, b []byte) (err error)

func ClearCache

func ClearCache() error

This clears cache. It is only needed for testing purposes.

func DownloadBlock

func DownloadBlock(blockIndex int64) ([]byte, error)

Utility function to download the block

func GetBlock

func GetBlock(blockIndex int64) (error, []byte)

func GetBlockFromCache

func GetBlockFromCache(blockIndex int64) ([]byte, error)

Utility function to check if the block is in the cache and get it if it is

func GetBlockSize

func GetBlockSize() int64

func GetBytes

func GetBytes(offset int64, to int64) (error, []byte)

func GetFileSize

func GetFileSize() int64

func InitializeCache

func InitializeCache(blockSize int, numBlocks int, readWrite bool) error

func IsReadWrite

func IsReadWrite() bool

func LocalDownloadBlock

func LocalDownloadBlock(blockIndex int64) (err error, b []byte)

func LocalSetup

func LocalSetup(filePath string, readWrite bool) error

func LocalUploadBlock

func LocalUploadBlock(blockIndex int64, data []byte) error

func SetBlock

func SetBlock(blockIndex int64, blockOffset int64, data []byte) error

func SetBytes

func SetBytes(offset int64, data []byte) error

Types

type FileManager

type FileManager struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL