app

package
v0.0.0-...-14308cf Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SampleInterval time.Duration `env:"SAMPLE_INTERVAL,            report"`
	Deployment     string        `env:"DEPLOYMENT, report"`
	Job            string        `env:"JOB, report"`
	Index          string        `env:"INDEX, report"`
	IP             string        `env:"IP, report"`

	DebugPort  uint16 `env:"DEBUG_PORT, report"`
	MetricPort uint16 `env:"METRIC_PORT, report, required"`

	CACertPath string `env:"CA_CERT_PATH, required, report"`
	CertPath   string `env:"CERT_PATH, required, report"`
	KeyPath    string `env:"KEY_PATH, required, report"`
}

Config holds the configuration for the system metrics agent.

func LoadConfig

func LoadConfig() Config

type SystemMetricsAgent

type SystemMetricsAgent struct {
	// contains filtered or unexported fields
}

func NewSystemMetricsAgent

func NewSystemMetricsAgent(i collector.InputFunc, cfg Config, log *log.Logger) *SystemMetricsAgent

func (*SystemMetricsAgent) DebugAddr

func (a *SystemMetricsAgent) DebugAddr() string

func (*SystemMetricsAgent) MetricsAddr

func (a *SystemMetricsAgent) MetricsAddr() string

func (*SystemMetricsAgent) Run

func (a *SystemMetricsAgent) Run()

func (*SystemMetricsAgent) Shutdown

func (a *SystemMetricsAgent) Shutdown(ctx context.Context)

Jump to

Keyboard shortcuts

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