providers

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoProvider = errors.New("config provider was not online")
	ErrTimeout    = errors.New("timed out while waiting for config provider to come online")
)

Functions

This section is empty.

Types

type Provider

type Provider interface {
	FetchConfig() (types.Config, error)
	IsOnline() bool
	ShouldRetry() bool
	BackoffDuration() time.Duration
}

Provider represents an external source of configuration. The source can be local to the host system or it may be remote. The provider dictates whether or not the source is online, if the caller should try again when the source is offline, and how long the caller should wait before retries.

type ProviderCreator

type ProviderCreator interface {
	Create(logger *log.Logger) Provider
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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