package progressreader

import "github.com/docker/docker/pkg/progressreader"

Package progressreader provides a Reader with a progress bar that can be printed out using the streamformatter package.

Index

Types

type Config

type Config struct {
	In         io.ReadCloser // Stream to read from
	Out        io.Writer     // Where to send progress bar to
	Formatter  *streamformatter.StreamFormatter
	Size       int64
	Current    int64
	LastUpdate int64
	NewLines   bool
	ID         string
	Action     string
}

Config contains the configuration for a Reader with progress bar.

func New

func New(newReader Config) *Config

New creates a new Config.

func (*Config) Close

func (config *Config) Close() error

Close closes the reader (Config).

func (*Config) Read

func (config *Config) Read(p []byte) (n int, err error)

Source Files

progressreader.go

Version
v1.9.1-rc1
Published
Nov 12, 2015
Platform
js/wasm
Imports
3 packages
Last checked
1 minute ago

Tools for package owners.