util

package
v1.0.5 Latest Latest
Warning

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

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

Documentation

Overview

* Copyright 2016 Adobe Systems Incorporated. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License.

* Copyright 2016 Adobe Systems Incorporated. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerIgnoreTempDir

func DockerIgnoreTempDir(log log15.Logger)

Do our best to add the porter temporary directory to .dockerignore

func ErrorRetryer added in v1.0.3

func ErrorRetryer(count int, retryMsg func(int), action func() error) (err error)

ErrorRetryer does exponential backoff of the action function which returns an error

func GitIgnoreTempDir

func GitIgnoreTempDir(log log15.Logger)

Do our best to add the porter temporary directory to .gitignore

func OverrideDockerClient

func OverrideDockerClient(log log15.Logger) (success bool)

download docker client 1.7.1 because of this regression https://github.com/docker/docker/issues/15785#issuecomment-153871706

func SuccessRetryer added in v1.0.3

func SuccessRetryer(count int, retryMsg func(int), action func() bool) (success bool)

SuccessRetryer does exponential backoff of the action function which returns a boolean

Here's some math around the count input count 1 == cumulative time of 2 seconds or ~0 mins count 2 == cumulative time of 6 seconds or ~0 mins count 3 == cumulative time of 14 seconds or ~0 mins count 4 == cumulative time of 30 seconds or ~0 mins count 5 == cumulative time of 62 seconds or ~1 mins count 6 == cumulative time of 126 seconds or ~2 mins count 7 == cumulative time of 254 seconds or ~4 mins count 8 == cumulative time of 510 seconds or ~8 mins count 9 == cumulative time of 1022 seconds or ~17 mins count 10 == cumulative time of 2046 seconds or ~34 mins

Types

This section is empty.

Jump to

Keyboard shortcuts

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