Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultDownloadWorkers = 4 DefaultBlockSize = 512 //KB )
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(cfg *Config) pathfs.FileSystem
New creates a new filesystem object with given configuration
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config represents a filesystem configuration object Configuration objects can be used to manipulate some filesystem flags in runtime
func NewConfig ¶
NewConfig creates a new filesystem config object with given meta store, and data storage and local cache directory
func (*Config) SetDataStorage ¶
SetDataStorage sets the filesystem data storage in runtime
func (*Config) SetMetaStore ¶
SetMetaStore sets the filesystem meta store in runtime.
type Downloader ¶
type Downloader struct { Workers int Storage storage.Storage Blocks []meta.BlockInfo BlockSize uint64 }
func (*Downloader) Download ¶
func (d *Downloader) Download(output *os.File) error
Download download the file into this output file
func (*Downloader) DownloadBlock ¶
func (d *Downloader) DownloadBlock(block meta.BlockInfo) ([]byte, error)
type OutputBlock ¶
Click to show internal directories.
Click to hide internal directories.