package progressreader

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

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
	Size       int
	Current    int
	LastUpdate int
	NewLines   bool
	ID         string
	Action     string
}

Reader with progress bar

func New

func New(newReader Config) *Config

func (*Config) Close

func (config *Config) Close() error

func (*Config) Read

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

type JSONProg

type JSONProg struct {
	Current int
	Total   int
}

func (*JSONProg) GetCurrent

func (j *JSONProg) GetCurrent() int

func (*JSONProg) GetTotal

func (j *JSONProg) GetTotal() int

type PR_JSONProgress

type PR_JSONProgress interface {
	GetCurrent() int
	GetTotal() int
}

type StreamFormatter

type StreamFormatter interface {
	FormatProg(string, string, interface{}) []byte
	FormatStatus(string, string, ...interface{}) []byte
	FormatError(error) []byte
}

Source Files

progressreader.go

Version
v1.6.1
Published
May 7, 2015
Platform
js/wasm
Imports
1 packages
Last checked
now

Tools for package owners.