common

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2018 License: Apache-2.0 Imports: 12 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(ctx context.Context, r runner.Runner) error

Clean removes left-over containers, networks, and 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.

func RefreshDuration added in v0.2.2

func RefreshDuration(expiration time.Time) time.Duration

RefreshDuration calculates when to refresh the access token. We refresh a bit prior to the token's expiration.

func SubstituteAndValidate added in v0.3.2

func SubstituteAndValidate(b *pb.Build, substMap map[string]string) error

SubstituteAndValidate merges the substitutions from the build config and the local flag, validates them and the build.

Types

This section is empty.

Jump to

Keyboard shortcuts

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