config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultConfigurationFilePath = "config/config.yaml"
)

Variables

View Source
var (
	ErrNoServiceInConfig  = errors.New("configuration file should contain at least 1 service")
	ErrConfigFileNotFound = errors.New("configuration file not found")
	ErrConfigNotLoaded    = errors.New("configuration is nil")
)

Functions

func Load

func Load(configFile string) error

func LoadDefaultConfiguration

func LoadDefaultConfiguration() error

Types

type Config

type Config struct {
	Metrics  bool                 `yaml:"metrics"`
	Debug    bool                 `yaml:"debug"`
	Alerting *core.AlertingConfig `yaml:"alerting"`
	Services []*core.Service      `yaml:"services"`
}

func Get

func Get() *Config

Jump to

Keyboard shortcuts

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