renter

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2015 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileEntry

type FileEntry struct {
	Pieces []FilePiece
}

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

func (r *Renter) Download(nickname, filename string) (err error)

Download requests a file from the host it was stored with, and downloads it into the specified filename.

func (*Renter) RenameFile

func (r *Renter) RenameFile(currentName, newName string) error

func (*Renter) RentFile

func (r *Renter) RentFile(rfp components.RentFileParameters) (err error)

TODO: Do the uploading in parallel.

func (*Renter) RentInfo

func (r *Renter) RentInfo() (ri components.RentInfo, err error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL