streamformatter

package
v1.4.2-0...-2fe51ec Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StderrFormater

type StderrFormater struct {
	io.Writer
	*StreamFormatter
}

func (*StderrFormater) Write

func (sf *StderrFormater) Write(buf []byte) (int, error)

type StdoutFormater

type StdoutFormater struct {
	io.Writer
	*StreamFormatter
}

func (*StdoutFormater) Write

func (sf *StdoutFormater) Write(buf []byte) (int, error)

type StreamFormatter

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

func NewJSONStreamFormatter

func NewJSONStreamFormatter() *StreamFormatter

NewJSONStreamFormatter returns a StreamFormatter configured to stream json

func NewStreamFormatter

func NewStreamFormatter() *StreamFormatter

NewStreamFormatter returns a simple StreamFormatter

func (*StreamFormatter) FormatError

func (sf *StreamFormatter) FormatError(err error) []byte

func (*StreamFormatter) FormatProgress

func (sf *StreamFormatter) FormatProgress(id, action string, progress *jsonmessage.JSONProgress) []byte

func (*StreamFormatter) FormatStatus

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

func (*StreamFormatter) FormatStream

func (sf *StreamFormatter) FormatStream(str string) []byte

Jump to

Keyboard shortcuts

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