util

package
v0.0.0-...-57ca673 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2016 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogCommand

func LogCommand(cmd *exec.Cmd, asDebug bool)

func RandStringBytes

func RandStringBytes(n int) string

func ReaderWithProgress

func ReaderWithProgress(r io.Reader, total int64) io.Reader

func Redact

func Redact(str, substr string) string

func Retry

func Retry(retries int, sleep time.Duration, action func() error) error

func UnikTmpDir

func UnikTmpDir() string

fix issue with docker needing mounted files to exist within home dir

Types

type AddTraceHook

type AddTraceHook struct {
	Full bool
}

func (*AddTraceHook) Fire

func (h *AddTraceHook) Fire(entry *logrus.Entry) error

func (*AddTraceHook) Levels

func (h *AddTraceHook) Levels() []logrus.Level

type RawVolume

type RawVolume struct {
	Path string `json:"Path"`
	Size int64  `json:"Size"`
}

type RedactedTextFormatter

type RedactedTextFormatter struct {
	// Set to true to bypass checking for a TTY before outputting colors.
	ForceColors bool

	// Force disabling colors.
	DisableColors bool

	// Disable timestamp logging. useful when output is redirected to logging
	// system that already adds timestamps.
	DisableTimestamp bool

	// Enable logging the full timestamp when a TTY is attached instead of just
	// the time passed since beginning of execution.
	FullTimestamp bool

	// TimestampFormat to use for display when a full timestamp is printed
	TimestampFormat string

	// The fields are sorted by default for a consistent output. For applications
	// that log extremely frequently and don't use the JSON formatter this may not
	// be desired.
	DisableSorting bool

	// Redactions specifies sensitive strings that should be redacted (replaced
	// with *'s) in all outputs.
	Redactions []string
}

func (*RedactedTextFormatter) Format

func (f *RedactedTextFormatter) Format(entry *logrus.Entry) ([]byte, error)

type TeeHook

type TeeHook struct {
	W io.Writer
}

func (*TeeHook) Fire

func (h *TeeHook) Fire(entry *logrus.Entry) error

func (*TeeHook) Levels

func (h *TeeHook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

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