Versions in this module Expand all Collapse all v1 v1.4.0 Apr 1, 2019 Changes in this version + const DefaultDirHealth + const SiaDirExtension + var ErrPathOverload = errors.New("a siadir already exists at that location") + var ErrUnknownPath = errors.New("no siadir known with that path") + var ErrUnknownThread = errors.New("thread should not be calling Close(), does not have control of the siadir") + func ApplyUpdates(updates ...writeaheadlog.Update) error + func IsSiaDirUpdate(update writeaheadlog.Update) bool + type Metadata struct + AggregateNumFiles uint64 + AggregateSize uint64 + Health float64 + LastHealthCheckTime time.Time + MinRedundancy float64 + ModTime time.Time + NumFiles uint64 + NumStuckChunks uint64 + NumSubDirs uint64 + RootDir string + SiaPath modules.SiaPath + StuckHealth float64 + type SiaDir struct + func LoadSiaDir(rootDir string, siaPath modules.SiaPath, deps modules.Dependencies, ...) (*SiaDir, error) + func New(siaPath modules.SiaPath, rootDir string, wal *writeaheadlog.WAL) (*SiaDir, error) + func (sd *SiaDir) Delete() error + func (sd *SiaDir) Deleted() bool + func (sd *SiaDir) Metadata() Metadata + func (sd *SiaDir) SiaPath() modules.SiaPath + func (sd *SiaDir) UpdateMetadata(metadata Metadata) error + type SiaDirSet struct + func NewSiaDirSet(rootDir string, wal *writeaheadlog.WAL) *SiaDirSet + func (sds *SiaDirSet) Delete(siaPath modules.SiaPath) error + func (sds *SiaDirSet) Exists(siaPath modules.SiaPath) (bool, error) + func (sds *SiaDirSet) InitRootDir() error + func (sds *SiaDirSet) NewSiaDir(siaPath modules.SiaPath) (*SiaDirSetEntry, error) + func (sds *SiaDirSet) Open(siaPath modules.SiaPath) (*SiaDirSetEntry, error) + func (sds *SiaDirSet) UpdateMetadata(siaPath modules.SiaPath, metadata Metadata) error + type SiaDirSetEntry struct + func (entry *SiaDirSetEntry) Close() error