Versions in this module Expand all Collapse all v0 v0.2.0 Jun 2, 2019 Changes in this version + var ErrAppendOnly = errors.New("file is append-only") + var ErrNotReadable = errors.New("file is not readable") + var ErrNotWriteable = errors.New("file is not writeable") + type DialStatsUpdate struct + Host hostdb.HostPublicKey + Stats proto.DialStats + type DownloadStatsUpdate struct + Host hostdb.HostPublicKey + Stats proto.DownloadStats + type HostSet struct + func NewHostSet(contracts renter.ContractSet, hkr renter.HostKeyResolver, ...) *HostSet + func (set *HostSet) Close() error + type PseudoFS struct + func NewFileSystem(root string, contracts renter.ContractSet, hkr renter.HostKeyResolver, ...) *PseudoFS + func (fs *PseudoFS) Chmod(name string, mode os.FileMode) error + func (fs *PseudoFS) Close() error + func (fs *PseudoFS) Create(name string, minShards int) (*PseudoFile, error) + func (fs *PseudoFS) Mkdir(name string, perm os.FileMode) error + func (fs *PseudoFS) MkdirAll(path string, perm os.FileMode) error + func (fs *PseudoFS) Open(name string) (*PseudoFile, error) + func (fs *PseudoFS) OpenFile(name string, flag int, perm os.FileMode, minShards int) (*PseudoFile, error) + func (fs *PseudoFS) Remove(name string) error + func (fs *PseudoFS) RemoveAll(path string) error + func (fs *PseudoFS) Rename(oldname, newname string) error + func (fs *PseudoFS) Stat(name string) (os.FileInfo, error) + type PseudoFile struct + func (pf PseudoFile) Close() error + func (pf PseudoFile) Name() string + func (pf PseudoFile) Read(p []byte) (int, error) + func (pf PseudoFile) ReadAt(p []byte, off int64) (int, error) + func (pf PseudoFile) Readdir(n int) ([]os.FileInfo, error) + func (pf PseudoFile) Readdirnames(n int) ([]string, error) + func (pf PseudoFile) Seek(offset int64, whence int) (int64, error) + func (pf PseudoFile) Stat() (os.FileInfo, error) + func (pf PseudoFile) Sync() error + func (pf PseudoFile) Truncate(size int64) error + func (pf PseudoFile) Write(p []byte) (int, error) + func (pf PseudoFile) WriteAt(p []byte, off int64) (int, error) + type SHARDClient struct + func NewSHARDClient(addr string) *SHARDClient + func (c *SHARDClient) ChainHeight() (types.BlockHeight, error) + func (c *SHARDClient) LookupHost(prefix string) (hostdb.HostPublicKey, error) + func (c *SHARDClient) ResolveHostKey(pubkey hostdb.HostPublicKey) (modules.NetAddress, error) + func (c *SHARDClient) Synced() (bool, error) + type SiadClient struct + func NewSiadClient(addr, password string) *SiadClient + func (c *SiadClient) AcceptTransactionSet(txnSet []types.Transaction) error + func (c *SiadClient) ChainHeight() (types.BlockHeight, error) + func (c *SiadClient) FeeEstimate() (minFee, maxFee types.Currency, err error) + func (c *SiadClient) LookupHost(prefix string) (hostdb.HostPublicKey, error) + func (c *SiadClient) NewWalletAddress() (types.UnlockHash, error) + func (c *SiadClient) ResolveHostKey(pubkey hostdb.HostPublicKey) (modules.NetAddress, error) + func (c *SiadClient) SignTransaction(txn *types.Transaction, toSign []crypto.Hash) error + func (c *SiadClient) Synced() (bool, error) + func (c *SiadClient) UnlockConditions(addr types.UnlockHash) (types.UnlockConditions, error) + func (c *SiadClient) UnspentOutputs() ([]modules.UnspentOutput, error) + type UploadStatsUpdate struct + Host hostdb.HostPublicKey + Stats proto.UploadStats + type WalrusClient struct + func NewWalrusClient(addr string) *WalrusClient + func (c *WalrusClient) AcceptTransactionSet(txnSet []types.Transaction) error + func (c *WalrusClient) FeeEstimate() (minFee, maxFee types.Currency, err error) + func (c *WalrusClient) NewWalletAddress() (types.UnlockHash, error) + func (c *WalrusClient) SignTransaction(txn *types.Transaction, toSign []crypto.Hash) error + func (c *WalrusClient) UnlockConditions(addr types.UnlockHash) (types.UnlockConditions, error) + func (c *WalrusClient) UnspentOutputs() ([]modules.UnspentOutput, error) v0.1.0 May 16, 2018 Changes in this version + var ErrCanceled = errors.New("canceled") + func Checkup(contracts renter.ContractSet, m *renter.MetaFile, scan renter.ScanFn) <-chan CheckupResult + func DownloadChunkShards(hosts []*renter.ShardDownloader, chunkIndex int64, minShards int, ...) (shards [][]byte, shardLen int, err error) + func ScanHosts(hosts []hostdb.HostPublicKey, scan renter.ScanFn) <-chan ScanResult + type CheckupResult struct + Bandwidth float64 + Error error + Host hostdb.HostPublicKey + Latency time.Duration + func CheckupContract(contract *renter.Contract, scan renter.ScanFn) CheckupResult + type DirQueueUpdate struct + Filename string + Filesize int64 + type DirSkipUpdate struct + Err error + Filename string + type FileIter func() (string, string, error) + func NewRecursiveFileIter(dir, metaDir string) FileIter + func NewRecursiveMetaFileIter(metaDir, dir string) FileIter + func NewShallowFileIter(dir, metaDir string) FileIter + type MigrateDirIter func() (string, renter.ContractSet, error) + func NewRecursiveMigrateDirIter(metaDir, contractDir string) MigrateDirIter + type MigrateSkipUpdate struct + Err error + Host hostdb.HostPublicKey + type Operation struct + func Download(f *os.File, contracts renter.ContractSet, m *renter.MetaFile, ...) *Operation + func DownloadDir(nextFile FileIter, contracts renter.ContractSet, scan renter.ScanFn) *Operation + func DownloadStream(w io.Writer, contracts renter.ContractSet, m *renter.MetaFile, ...) *Operation + func MigrateDirDirect(newcontracts renter.ContractSet, nextFile MigrateDirIter, scan renter.ScanFn, ...) *Operation + func MigrateDirFile(newcontracts renter.ContractSet, nextFile FileIter, scan renter.ScanFn, ...) *Operation + func MigrateDirRemote(newcontracts renter.ContractSet, nextFile MigrateDirIter, scan renter.ScanFn, ...) *Operation + func MigrateDirect(newcontracts, oldcontracts renter.ContractSet, m *renter.MetaFile, ...) *Operation + func MigrateFile(f *os.File, newcontracts renter.ContractSet, m *renter.MetaFile, ...) *Operation + func MigrateRemote(newcontracts, oldcontracts renter.ContractSet, m *renter.MetaFile, ...) *Operation + func Upload(f *os.File, contracts renter.ContractSet, m *renter.MetaFile, ...) *Operation + func UploadDir(nextFile FileIter, contracts renter.ContractSet, minShards int, ...) *Operation + func (op *Operation) Cancel() + func (op *Operation) Canceled() bool + func (op *Operation) Err() error + func (op *Operation) Updates() <-chan interface{} + type ScanResult struct + Error error + Host hostdb.ScannedHost + type TransferProgressUpdate struct + Start int64 + Total int64 + Transferred int64