configuration

package
v0.1.28 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadConfig

func ReadConfig(cfg *Iter8Config) error

ReadConfig reads the configuration from a combination of files and the environment

Types

type Analytics

type Analytics struct {
	Endpoint string `yaml:"endpoint" envconfig:"ITER8_ANALYTICS_ENDPOINT"`
}

Analytics captures details of analytics endpoint(s)

type Iter8Config

type Iter8Config struct {
	Analytics   `json:"analytics" yaml:"analytics"`
	Namespace   string `envconfig:"ITER8_NAMESPACE"`
	HandlersDir string `envconfig:"HANDLERS_DIR"`
}

Iter8Config describes structure of configuration file

type Iter8ConfigBuilder

type Iter8ConfigBuilder Iter8Config

Iter8ConfigBuilder type for building new config by hand

func NewIter8Config

func NewIter8Config() Iter8ConfigBuilder

NewIter8Config returns a new config builder

func (Iter8ConfigBuilder) Build

func (b Iter8ConfigBuilder) Build() Iter8Config

Build ..

func (Iter8ConfigBuilder) WithEndpoint

func (b Iter8ConfigBuilder) WithEndpoint(endpoint string) Iter8ConfigBuilder

WithEndpoint ..

func (Iter8ConfigBuilder) WithHandlersDir

func (b Iter8ConfigBuilder) WithHandlersDir(handlersDir string) Iter8ConfigBuilder

WithHandlersDir ..

func (Iter8ConfigBuilder) WithNamespace

func (b Iter8ConfigBuilder) WithNamespace(namespace string) Iter8ConfigBuilder

WithNamespace ..

Jump to

Keyboard shortcuts

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