pgscv

package
v0.4.17 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

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

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           bool                  `yaml:"autoupdate"`       // control auto-update enabled or not
	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
	ServicesConnSettings []service.ConnSetting `yaml:"services"` // Slice of connection settings for exact services
	Defaults             map[string]string     `yaml:"defaults"` // Defaults
	Filters              filter.Filters        `yaml:"filters"`
	DisableCollectors    []string              `yaml:"disable_collectors"` // List of collectors which should be disabled.
}

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 of config is not exists.

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