config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Value added in v1.3.0

func Value(val string) (string, error)

Value returns the config value based on a DSN.

Types

type Collector

type Collector struct {
	FloatingIPs   bool
	Images        bool
	Pricing       bool
	Servers       bool
	ServerMetrics bool
	LoadBalancers bool
	SSHKeys       bool
	Volumes       bool
}

Collector defines the collector specific configuration.

type Config

type Config struct {
	Server    Server
	Logs      Logs
	Target    Target
	Collector Collector
}

Config is a combination of all available configurations.

func Load

func Load() *Config

Load initializes a default configuration struct.

type Logs

type Logs struct {
	Level  string
	Pretty bool
}

Logs defines the level and color for log configuration.

type Server

type Server struct {
	Addr    string
	Path    string
	Timeout time.Duration
	Web     string
	Pprof   bool
}

Server defines the general server configuration.

type Target

type Target struct {
	Token   string
	Timeout time.Duration
}

Target defines the target specific configuration.

Jump to

Keyboard shortcuts

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