client

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyWithContext

func CopyWithContext(ctx context.Context, dst io.Writer, src io.Reader) (written int64, err error)

Types

type DownloadProgressBar

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

DownloadProgressBar is a progress bar that implements the container-library-client ProgressBar interface.

func (*DownloadProgressBar) Abort

func (dpb *DownloadProgressBar) Abort(drop bool)

func (*DownloadProgressBar) IncrBy

func (dpb *DownloadProgressBar) IncrBy(n int)

func (*DownloadProgressBar) Init

func (dpb *DownloadProgressBar) Init(contentLength int64)

func (*DownloadProgressBar) ProxyReader

func (dpb *DownloadProgressBar) ProxyReader(r io.Reader) io.ReadCloser

func (*DownloadProgressBar) Wait

func (dpb *DownloadProgressBar) Wait()

type ProgressCallback

type ProgressCallback func(int64, io.Reader, io.Writer) error

ProgressCallback is a function that provides progress information copying from a Reader to a Writer

func ProgressBarCallback

func ProgressBarCallback(ctx context.Context) ProgressCallback

ProgressBarCallback returns a progress bar callback unless e.g. --quiet or lower loglevel is set

type RoundTripper added in v1.3.1

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

func NewRoundTripper added in v1.3.1

func NewRoundTripper(ctx context.Context, inner http.RoundTripper) *RoundTripper

func (*RoundTripper) ProgressComplete added in v1.3.2

func (t *RoundTripper) ProgressComplete()

ProgressComplete overrides all progress bars, setting them to 100% complete.

func (*RoundTripper) ProgressShutdown added in v1.3.2

func (t *RoundTripper) ProgressShutdown()

ProgressShutdown immediately shuts down the mpb Progress container.

func (*RoundTripper) ProgressWait added in v1.3.2

func (t *RoundTripper) ProgressWait()

ProgressWait shuts down the mpb Progress container by waiting for all bars to complete.

func (*RoundTripper) RoundTrip added in v1.3.1

func (t *RoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

type UploadProgressBar added in v1.3.0

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

UploadProgressBar is a progress bar that implements the scs-library-client UploadCallback interface.

func (*UploadProgressBar) Finish added in v1.3.0

func (upb *UploadProgressBar) Finish()

func (*UploadProgressBar) GetReader added in v1.3.0

func (upb *UploadProgressBar) GetReader() io.Reader

func (*UploadProgressBar) InitUpload added in v1.3.0

func (upb *UploadProgressBar) InitUpload(totalSize int64, r io.Reader)

func (*UploadProgressBar) Terminate added in v1.3.0

func (upb *UploadProgressBar) Terminate()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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