config

package
v0.0.0-...-2911835 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const MONGO = "MONGO"
View Source
const SQL = "SQL"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Connections []Connection `yaml:"connections"`
}

func FromFile

func FromFile(file string) (*Config, error)

type Connection

type Connection struct {
	Name             string   `yaml:"name"`
	Type             string   `yaml:"type"`
	Subtype          string   `yaml:"subtype"`
	ConnectionString string   `yaml:"connectionStringFromEnv"`
	Metrics          []Metric `yaml:"metrics"`
}

type Metric

type Metric struct {
	Name       string `yaml:"name"`
	HelpString string `yaml:"helpString"`
	Database   string `yaml:"database"`
	Collection string `yaml:"collection"`
	Query      string `yaml:"query"`
	Time       int64  `yaml:"time"`
}

Jump to

Keyboard shortcuts

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