configuration

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 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 Loader

type Loader interface {
	Load(ctx context.Context) (*model.AppConfig, error)
}

Loader knows how to load app configuration in different formats and sources.

func NewYAMLV1Loader

func NewYAMLV1Loader(data string) Loader

NewYAMLV1Loader returns a loader that knows how to load configuration from a YAML string.

type LoaderFunc

type LoaderFunc func(ctx context.Context) (*model.AppConfig, error)

LoaderFunc is a helper to create configuration loaders without declaring a new type.

func (LoaderFunc) Load

func (l LoaderFunc) Load(ctx context.Context) (*model.AppConfig, error)

Load satisifies configuration.Loader interface.

Jump to

Keyboard shortcuts

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