config

package
v0.0.0-...-6bdf688 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {

	// Disable filesystem polling, used by hub
	DisableDirtyPolling DefaultBool `default:"false" envconfig:"DISABLE_DIRTY_POLLING"`
	DisableFlexVolume   DefaultBool `default:"false" envconfig:"DISABLE_FLEXVOLUME"`

	DotmeshUpgradesURL string

	PollDirty struct {
		SuccessTimeout DefaultDuration `default:"1s" envconfig:"POLL_DIRTY_SUCCESS_TIMEOUT"`
		ErrorTimeout   DefaultDuration `default:"1s" envconfig:"POLL_DIRTY_ERROR_TIMEOUT"`
	}

	Upgrades struct {
		URL             string     `envconfig:"DOTMESH_UPGRADES_URL"`
		IntervalSeconds DefaultInt `default:"300" envconfig:"DOTMESH_UPGRADES_INTERVAL_SECONDS"`
	}
}

Config stores the configuration settings.

func Load

func Load() (Config, error)

Load loads the configuration from the environment.

func MustLoad

func MustLoad() Config

MustLoad loads the configuration from the environment and panics if an error is encountered.

type DefaultBool

type DefaultBool bool

func (*DefaultBool) Decode

func (b *DefaultBool) Decode(value string) error

type DefaultDuration

type DefaultDuration time.Duration

func (*DefaultDuration) Decode

func (b *DefaultDuration) Decode(value string) error

func (*DefaultDuration) Duration

func (b *DefaultDuration) Duration() time.Duration

type DefaultInt

type DefaultInt int

func (*DefaultInt) Decode

func (b *DefaultInt) Decode(value string) error

func (*DefaultInt) Value

func (b *DefaultInt) Value() int

Jump to

Keyboard shortcuts

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