package progress
import "github.com/moby/buildkit/util/progress"
Index ¶
- func WithProgress(ctx context.Context, pw Writer) context.Context
- type Controller
- type MultiReader
- func NewMultiReader(pr Reader) *MultiReader
- func (mr *MultiReader) Reader(ctx context.Context) Reader
- type MultiWriter
- func NewMultiWriter(opts ...WriterOption) *MultiWriter
- func (ps *MultiWriter) Add(pw Writer)
- func (ps *MultiWriter) Close() error
- func (ps *MultiWriter) Delete(pw Writer)
- func (ps *MultiWriter) Write(id string, v interface{}) error
- func (ps *MultiWriter) WriteRawProgress(p *Progress) error
- type Progress
- type Reader
- type Status
- type Writer
- type WriterFactory
- type WriterOption
Functions ¶
func WithProgress ¶
Types ¶
type Controller ¶
type Controller interface { Start(context.Context) (context.Context, func(error)) Status(id string, action string) func() }
type MultiReader ¶
type MultiReader struct {
// contains filtered or unexported fields
}
func NewMultiReader ¶
func NewMultiReader(pr Reader) *MultiReader
func (*MultiReader) Reader ¶
func (mr *MultiReader) Reader(ctx context.Context) Reader
type MultiWriter ¶
type MultiWriter struct {
// contains filtered or unexported fields
}
func NewMultiWriter ¶
func NewMultiWriter(opts ...WriterOption) *MultiWriter
func (*MultiWriter) Add ¶
func (ps *MultiWriter) Add(pw Writer)
func (*MultiWriter) Close ¶
func (ps *MultiWriter) Close() error
func (*MultiWriter) Delete ¶
func (ps *MultiWriter) Delete(pw Writer)
func (*MultiWriter) Write ¶
func (ps *MultiWriter) Write(id string, v interface{}) error
func (*MultiWriter) WriteRawProgress ¶
func (ps *MultiWriter) WriteRawProgress(p *Progress) error
type Progress ¶
type Progress struct { ID string Timestamp time.Time Sys interface{} // contains filtered or unexported fields }
func (*Progress) Meta ¶
type Reader ¶
func NewContext ¶
NewContext returns a new context and a progress reader that captures all progress items writtern to this context. Last returned parameter is a closer function to signal that no new writes will happen to this context.
type Status ¶
type Writer ¶
func NewFromContext ¶
NewFromContext creates a new Writer based on a Writer previously stored in the Context and returns a new Context with the new Writer stored. It is the callers responsibility to Close the returned Writer to avoid resource leaks.
type WriterFactory ¶
WriterFactory will generate a new progress Writer and return a new Context with the new Writer stored. It is the callers responsibility to Close the returned Writer to avoid resource leaks.
func FromContext ¶
func FromContext(ctx context.Context, opts ...WriterOption) WriterFactory
FromContext returns a WriterFactory to generate new progress writers based on a Writer previously stored in the Context.
type WriterOption ¶
type WriterOption func(Writer)
func WithMetadata ¶
func WithMetadata(key string, val interface{}) WriterOption
Source Files ¶
multireader.go multiwriter.go progress.go
Directories ¶
Path | Synopsis |
---|---|
util/progress/controller | |
util/progress/logs | |
util/progress/progressui | |
util/progress/progresswriter |
- Version
- v0.10.5
- Published
- Oct 18, 2022
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 12 hours ago –
Tools for package owners.