config

package
v0.0.0-...-6e2cd59 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() error

Initializes a new Diago config For GrafanaDashboardConfig, if the env variable is not set then defaults to the default grafana-dash.json from packr2

Types

type Config

type Config struct {
	Host           string `envconfig:"DIAGO_HOST" required:"true"`
	GRPCPort       uint64 `envconfig:"DIAGO_GRPC_PORT" default:"5000"`
	APIPort        uint64 `envconfig:"DIAGO_API_PORT" default:"80"`
	PrometheusPort uint64 `envconfig:"DIAGO_PROMETHEUS_PORT" default:"2112"`

	DefaultGroupCapacity uint64 `envconfig:"DIAGO_DEFAULT_GROUP_CAPACITY" default:"200"`
	DefaultNamespace     string `envconfig:"DIAGO_DEFAULT_NAMESPACE" default:"default"`

	StoragePath string `envconfig:"DIAGO_STORAGE_PATH" default:"diago.db"`

	Debug bool `envconfig:"DIAGO_DEBUG" default:"false"`

	GrafanaBasePath        string `envconfig:"DIAGO_GRAFANA_BASE_PATH" default:""`
	GrafanaAPIKey          string `envconfig:"DIAGO_GRAFANA_API_KEY" default:""`
	GrafanaDashboardConfig string `envconfig:"DIAGO_GRAFANA_DASHBOARD_CONFIG"`
}
var Diago *Config

Jump to

Keyboard shortcuts

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