util

package
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2016 License: Apache-2.0 Imports: 8 Imported by: 4

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.

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 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