common

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package common shares methods for local builder.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backoff

func Backoff(baseDelay, maxDelay time.Duration, retries int) time.Duration

Backoff returns a value in [0, maxDelay] that increases exponentially with retries, starting from baseDelay.

func Clean added in v0.1.1

func Clean(r runner.Runner) error

Clean removes left over containers, networks, volumes from a previous run of the local builder. This happens when ctrl+c is used during a local build. Each cleaning is defined by a get command, a warning to print if the get command returns something, and a delete command to apply in that case.

func ParseSubstitutionsFlag

func ParseSubstitutionsFlag(substitutions string) (map[string]string, error)

ParseSubstitutionsFlag parses a substitutions string into a map.

Types

type LogEntry

type LogEntry struct {
	// Line number for this line of output.
	Line int
	// Label describes the writer generating the log entry. eg, "MAIN" or "3:gcr.io/cloud-builders/some-builder:STDOUT"
	Label string
	// Text is one line of output.
	Text string
	// Time is the time the log line was written.
	Time time.Time
}

LogEntry is a single log entry containing 1 line of text.

Jump to

Keyboard shortcuts

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