tools

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2019 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Required = &requiredRule{message: "cannot be blank", skipNil: false}

Functions

func RetryIn

func RetryIn(interval time.Duration, call func() bool)

RetryIn retries passed function `call` until it end with success, else repeat again.

func RetryIncrementally

func RetryIncrementally(interval time.Duration, call func() bool)

RetryIncrementally retries passed function `call` until it end with success, else repeat again and increments retrying interval up to 2 hour.

func RetryIncrementallyUntil

func RetryIncrementallyUntil(interval time.Duration, until time.Duration, call func() bool) bool

RetryIncrementallyUntil retries passed function `call` until it end with success (returns true), else repeat again and increments retrying interval up to 2 hour until function `call` succeeded (returns true) or until `until` time reached (returns false).

Types

type URL

type URL struct {
	URL *url.URL
	Str string
	// contains filtered or unexported fields
}

func (*URL) SetBasePath

func (j *URL) SetBasePath(path string)

func (*URL) UnmarshalYAML

func (j *URL) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*URL) Validate

func (j *URL) Validate() error

func (*URL) WithPath

func (j *URL) WithPath(path string) string

func (*URL) WithPathURL

func (j *URL) WithPathURL(path string) url.URL

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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