config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Holder

type Holder struct {
	// contains filtered or unexported fields
}

Holder encapsulates te current configuration.

func NewReloadingConfig

func NewReloadingConfig(path string, reloadConfig *ReloadConfig) (*Holder, error)

NewReloadingConfig sets up a new holder that periodically reloads the configuration from disk. The reloaded configuration then replaces the current version in memory.

func (*Holder) Get

func (c *Holder) Get() *v1alpha1.PodPresetSpec

Get returns the current active version of the configuration.

func (*Holder) Reload

func (c *Holder) Reload() error

Reload forces a reload of the configuration the holder was configured with.

type ReloadConfig

type ReloadConfig struct {
	FailureRetryInterval time.Duration
	ReloadInterval       time.Duration
}

ReloadConfig encapsulates the configurable components of the retry logic.

Jump to

Keyboard shortcuts

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