Documentation ¶
Index ¶
- type FileEntry
- type FilePiece
- type Renter
- func (r *Renter) Download(nickname, filename string) (err error)
- func (r *Renter) RenameFile(currentName, newName string) error
- func (r *Renter) RentFile(rfp components.RentFileParameters) (err error)
- func (r *Renter) RentInfo() (ri components.RentInfo, err error)
- func (r *Renter) RentSmallFile(rsfp components.RentSmallFileParameters) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilePiece ¶
type FilePiece struct { Host components.HostEntry // Where to find the file. Contract consensus.FileContract // The contract being enforced. ContractID consensus.ContractID // The ID of the contract. }
type Renter ¶
type Renter struct {
// contains filtered or unexported fields
}
func New ¶
func New(state *consensus.State, hdb components.HostDB, wallet components.Wallet) (r *Renter, err error)
func (*Renter) Download ¶
Download requests a file from the host it was stored with, and downloads it into the specified filename.
func (*Renter) RenameFile ¶
func (*Renter) RentFile ¶
func (r *Renter) RentFile(rfp components.RentFileParameters) (err error)
TODO: Do the uploading in parallel.
func (*Renter) RentSmallFile ¶
func (r *Renter) RentSmallFile(rsfp components.RentSmallFileParameters) (err error)
TODO: Do the uploading in parallel.
On mutexes: cannot do network stuff with a lock on, so we need to get the lock, get the contracts, and then drop the lock.
Click to show internal directories.
Click to hide internal directories.