config

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Server   ServerConfiguration             `yaml:"server"`
	M3nsch   M3nschConfiguration             `yaml:"m3nsch" validate:"nonzero"`
	Metrics  instrument.MetricsConfiguration `yaml:"metrics" validate:"nonzero"`
	DBClient client.Configuration            `yaml:"dbClient"`
}

Configuration represents the knobs available to configure a m3nsch_server

func New

func New(filename string) (Configuration, error)

New returns a Configuration read from the specified path

type M3nschConfiguration

type M3nschConfiguration struct {
	Concurrency       int `yaml:"concurrency" validate:"min=500,max=5000"`
	NumPointsPerDatum int `yaml:"numPointsPerDatum" validate:"min=10,max=120"`
}

M3nschConfiguration represents the knobs available to configure m3nsch properties

type ServerConfiguration

type ServerConfiguration struct {
	ListenAddress string  `yaml:"listenAddress" validate:"nonzero"`
	DebugAddress  string  `yaml:"debugAddress" validate:"nonzero"`
	CPUFactor     float64 `yaml:"cpuFactor" validate:"min=0.5,max=3.0"`
}

ServerConfiguration represents the knobs available to configure server properties

Jump to

Keyboard shortcuts

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