Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is the error that happens when a sector data is not found ErrNotFound = errors.New("not found") )
Functions ¶
This section is empty.
Types ¶
type StorageManager ¶
type StorageManager interface { Start() error Close() error // Functions for download and storage responsibilities AddSectorBatch(sectorRoots []common.Hash) error AddSector(sectorRoot common.Hash, sectorData []byte) error DeleteSector(sectorRoot common.Hash) error DeleteSectorBatch(sectorRoots []common.Hash) error ReadSector(sectorRoot common.Hash) ([]byte, error) // Functions from user calls AddStorageFolder(path string, size uint64) error DeleteFolder(folderPath string) error ResizeFolder(folderPath string, size uint64) error // Status check Folders() []storage.HostFolder AvailableSpace() storage.HostSpace }
StorageManager is the interface to manager storage which will be provided to upper function calls. Supported methods are mutually exclusive
func New ¶
func New(persistDir string) (sm StorageManager, err error)
New creates a new storage manager with no disruptor
Click to show internal directories.
Click to hide internal directories.