env

package
v0.0.0-...-d6f8ab3 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2019 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ResultDir    string  `env:"SOLUTION_SERVER_RESULT_DIR" envDefault:"./results"`
	Port         string  `env:"SOLUTION_SERVER_PORT" envDefault:":45042"`
	SendDelay    int     `env:"SOLUTION_SEND_DELAY" envDefault:"5000"`
	ErrPercent   float64 `env:"SOLUTION_ERR_PERCENT" envDefault:"0.1"`
	NumUpdates   int     `env:"SOLUTION_NUM_UPDATES" envDefault:"1"`
	MaxSolutions int     `env:"SOLUTION_MAX_SOLUTIONS" envDefault:"1"`
}

Config represents the application configuration state loaded from env vars.

func LoadConfig

func LoadConfig() (Config, error)

LoadConfig loads the config from the environment if necessary and returns a copy.

Jump to

Keyboard shortcuts

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