docker: github.com/docker/docker/pkg/streamformatter Index | Files

package streamformatter

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

Package streamformatter provides helper functions to format a stream.

Index

Package Files

streamformatter.go streamwriter.go

func FormatError Uses

func FormatError(err error) []byte

FormatError formats the error as a JSON object

func FormatStatus Uses

func FormatStatus(id, format string, a ...interface{}) []byte

FormatStatus formats the specified objects according to the specified format (and id).

func NewJSONProgressOutput Uses

func NewJSONProgressOutput(out io.Writer, newLines bool) progress.Output

NewJSONProgressOutput returns a progress.Output that formats output using JSON objects

func NewProgressOutput Uses

func NewProgressOutput(out io.Writer) progress.Output

NewProgressOutput returns a progress.Output object that can be passed to progress.NewProgressReader.

func NewStderrWriter Uses

func NewStderrWriter(out io.Writer) io.Writer

NewStderrWriter returns a writer which formats the output as json message representing stderr lines

func NewStdoutWriter Uses

func NewStdoutWriter(out io.Writer) io.Writer

NewStdoutWriter returns a writer which formats the output as json message representing stdout lines

type AuxFormatter Uses

type AuxFormatter struct {
    io.Writer
}

AuxFormatter is a streamFormatter that writes aux progress messages

func (*AuxFormatter) Emit Uses

func (sf *AuxFormatter) Emit(id string, aux interface{}) error

Emit emits the given interface as an aux progress message

Package streamformatter imports 5 packages (graph) and is imported by 4147 packages. Updated 2020-03-02. Refresh now. Tools for package owners.