providers

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Names

func Names() []string

func Register

func Register(provider ProviderCreator)

Types

type List

type List []string

List holds the command-line-provided set of configuration provider names.

func (*List) Set

func (s *List) Set(val string) error

func (List) String

func (s List) String() string

type Provider

type Provider interface {
	Name() string
	FetchConfig() (config.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 {
	Name() string
	Create(logger log.Logger) Provider
}

func Get

func Get(name string) ProviderCreator

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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