transfer

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

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

func NewBatch

func NewBatch(log logrus.FieldLogger, transfers []*Transfer, parallel int, output io.Writer) *Batch

func (*Batch) Transfer

func (b *Batch) Transfer(ctx context.Context, failFast bool) error

type DownloadAsset

type DownloadAsset interface {
	GetName() string
	GetSize() int64
	Open(ctx context.Context) (io.ReadCloser, error)
}

type State

type State struct {
	Bar           *mpb.Bar
	LocalFilePath string
	Results       []string
}

type Step

type Step interface {
	GetProgressParams() (int64, decor.Decorator)
	Execute(ctx context.Context, s *State) error
}

type Transfer

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

func NewTransfer

func NewTransfer(origin DownloadAsset, steps []Step, finalStatus io.Writer) *Transfer

func (Transfer) Execute

func (w Transfer) Execute(ctx context.Context) error

func (*Transfer) GetSubject

func (w *Transfer) GetSubject() string

func (*Transfer) Prepare

func (w *Transfer) Prepare(pb *mpb.Progress)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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