pgscv

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: BSD-3-Clause Imports: 23 Imported by: 0 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

func Start

func Start(ctx context.Context, config *Config) error

Start is the application's starting point.

Types

type Config

type Config struct {
	BinaryPath            string                   // full path of the program, required for auto-update procedure
	BinaryVersion         string                   // version of the program, required for auto-update procedure
	AutoUpdate            string                   `yaml:"autoupdate"`       // controls auto-update procedure
	NoTrackMode           bool                     `yaml:"no_track_mode"`    // controls tracking sensitive information (query texts, etc)
	ListenAddress         string                   `yaml:"listen_address"`   // Network address and port where the application should listen on
	SendMetricsURL        string                   `yaml:"send_metrics_url"` // URL of Weaponry service metric gateway
	SendMetricsInterval   time.Duration            // Metric send interval
	APIKey                string                   `yaml:"api_key"`            // API key for accessing to Weaponry
	ServicesConnsSettings service.ConnsSettings    `yaml:"services"`           // All connections settings for exact services
	Defaults              map[string]string        `yaml:"defaults"`           // Defaults
	DisableCollectors     []string                 `yaml:"disable_collectors"` // List of collectors which should be disabled. DEPRECATED in favor collectors settings
	CollectorsSettings    model.CollectorsSettings `yaml:"collectors"`         // Collectors settings propagated from main YAML configuration
	Databases             string                   `yaml:"databases"`          // Regular expression string specifies databases from which metrics should be collected
	DatabasesRE           *regexp.Regexp           // Regular expression object compiled from Databases
}

Config defines application's configuration.

func NewConfig

func NewConfig(configFilePath string) (*Config, error)

NewConfig creates new config based on config file or return default config if config file is not specified.

func (*Config) Validate

func (c *Config) Validate() error

Validate checks configuration for stupid values and set defaults

Jump to

Keyboard shortcuts

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