configuration

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadConfig

func ReadConfig(configFile string, 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 ExperimentType

type ExperimentType struct {
	Name     string `yaml:"name"`
	Handlers `yaml:"handlers"`
}

ExperimentType is list of handlers for each supported experiment type

type Handlers

type Handlers struct {
	Start    string `yaml:"start"`
	Rollback string `yaml:"rollback"`
	Finish   string `yaml:"finish"`
	Failure  string `yaml:"failure"`
	Loop     string `yaml:"loop"`
}

Handlers is list of default handlers

type Iter8Config

type Iter8Config struct {
	ExperimentTypes []ExperimentType `yaml:"experimentTypes"`
	Analytics       `json:"analytics" yaml:"analytics"`
	Metrics         `json:"metrics" yaml:"metrics"`
	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 ..

func (Iter8ConfigBuilder) WithRequestCount

func (b Iter8ConfigBuilder) WithRequestCount(requestCount string) Iter8ConfigBuilder

WithRequestCount ..

func (Iter8ConfigBuilder) WithTestingPattern

func (b Iter8ConfigBuilder) WithTestingPattern(testingPattern string, handlers map[string]string) Iter8ConfigBuilder

WithTestingPattern ..

type Metrics

type Metrics struct {
	RequestCount string `yaml:"requestCount" envconfig:"REQUEST_COUNT"`
}

Metrics identifies the metric that should be used to count requests

Jump to

Keyboard shortcuts

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