config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package config handles the configuration parsing for FabricMon.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FabricmonConf

type FabricmonConf struct {
	PollInterval   time.Duration `yaml:"poll_interval"`
	ResetThreshold uint          `yaml:"counter_reset_threshold"`
	Mkey           uint64        `yaml:"m_key"`
	InfluxDB       []InfluxDBConf
	Logging        LoggingConf
	Topology       TopologyConf
}

FabricmonConf is the main configuration struct for FabricMon.

func ReadConfig

func ReadConfig(r io.Reader) (*FabricmonConf, error)

type InfluxDBConf

type InfluxDBConf struct {
	URL             string
	Database        string
	Username        string
	Password        string
	RetentionPolicy string `yaml:"retention_policy"`
	Timeout         time.Duration
}

InfluxDBConf holds the configuration values for a single InfluxDB instance.

type LoggingConf

type LoggingConf struct {
	LogLevel slog.Level `yaml:"log_level"`
}

type TopologyConf

type TopologyConf struct {
	Enabled   bool
	OutputDir string `yaml:"output_dir"`
}

Jump to

Keyboard shortcuts

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