utils

package
v0.0.0-...-ded32d3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2018 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseConfig

type DatabaseConfig struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	URL      string `yaml:"url"`
	Port     int    `yaml:"port"`
	// Name defines database name
	Name string `yaml:"name"`
	// MaxIdleConns connection pool conns, default is 2
	MaxIdleConns int `yaml:"maxIdleConns"`
	// MaxOpenConns sets the maximum number of open connections to the database. The default is 10.
	MaxOpenConns int `yaml:"maxOpenConns"`
}

DatabaseConfig defines database connection info

func (*DatabaseConfig) Format

func (d *DatabaseConfig) Format() string

Format is stringify DatabaseConfig

type ExtraConfig

type ExtraConfig struct {
	APIPort int    `yaml:"apiPort"`
	History string `yaml:"history"`
}

ExtraConfig defines extra config

type GlobalConfig

type GlobalConfig struct {
	DatabaseConfig   DatabaseConfig   `yaml:"databaseConfig"`
	PrometheusConfig PrometheusConfig `yaml:"prometheusConfig"`
	ExtraConfig      ExtraConfig      `yaml:"extraConfig"`
}

GlobalConfig defines global config

func Unmarshal

func Unmarshal(filename string) (*GlobalConfig, error)

Unmarshal defines how to parse file

type PrometheusConfig

type PrometheusConfig struct {
	Address string `yaml:"address"`
}

PrometheusConfig defines which prometheus to connect

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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