transfer

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

type Downloader struct {
	// contains filtered or unexported fields
}

func NewDownloader

func NewDownloader(clients ...*node.Client) *Downloader

func (*Downloader) Download

func (downloader *Downloader) Download(root, filename string, proof bool) error

type SegmentDownloader

type SegmentDownloader struct {
	// contains filtered or unexported fields
}

func NewSegmentDownloader

func NewSegmentDownloader(clients []*node.Client, file *download.DownloadingFile, withProof bool) (*SegmentDownloader, error)

func (*SegmentDownloader) Download

func (downloader *SegmentDownloader) Download() error

Download downloads segments in parallel.

func (*SegmentDownloader) ParallelCollect

func (downloader *SegmentDownloader) ParallelCollect(result *parallel.Result) error

ParallelCollect implements the parallel.Interface interface.

func (*SegmentDownloader) ParallelDo

func (downloader *SegmentDownloader) ParallelDo(routine, task int) (interface{}, error)

ParallelDo implements the parallel.Interface interface.

type UploadOption

type UploadOption struct {
	Tags     []byte // for kv operations
	Force    bool   // for kv to upload same file
	Disperse bool   // disperse files to different nodes
}

type Uploader

type Uploader struct {
	// contains filtered or unexported fields
}

func NewUploader

func NewUploader(flow *contract.FlowContract, clients []*node.Client) *Uploader

func NewUploaderLight

func NewUploaderLight(clients []*node.Client) *Uploader

func (*Uploader) BatchUpload added in v0.1.3

func (uploader *Uploader) BatchUpload(datas []core.IterableData, option ...[]UploadOption) error

upload data(batchly in 1 blockchain transaction if there are more than one files)

func (*Uploader) Upload

func (uploader *Uploader) Upload(data core.IterableData, option ...UploadOption) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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