config

package
v0.0.0-...-64d0389 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	OutFile string `yaml:"outfile"`
	API     struct {
		Username string `yaml:"username"`
		Password string `yaml:"password"`
		CertFile string `yaml:"certfile"`
		URL      string `yaml:"url"`
	} `yaml:"api"`
	Logging struct {
		Journal  bool   `yaml:"journal"`
		LevelStr string `yaml:"level"`
	} `yaml:"logging"`
}

Config contains the njmon_exporter configuration data

func ParseConfig

func ParseConfig(filename string) (*Config, error)

ParseConfig imports a yaml formatted config file into a Config struct

func (*Config) WriteConfig

func (c *Config) WriteConfig(filename string) error

WriteConfig will create a YAML formatted config file from a Config struct

type Flags

type Flags struct {
	Config string
	Debug  bool
}

Flags are the command line Flags

func ParseFlags

func ParseFlags() *Flags

parseFlags processes arguments passed on the command line in the format standard format: --foo=bar

Jump to

Keyboard shortcuts

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