config

package
v0.0.0-...-990e861 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	// General Settings
	Name                 string
	TelemetryUpdateDelay int `yaml:"telemetry-update-delay"`

	// MQTT Settings
	Broker   string
	Id       string
	User     string
	Password string

	// Sensors
	BootTimestamp bool `yaml:"boot-timestamp"`

	Cpu struct {
		Usage struct {
			Enabled bool
			Total   bool
			Decimal int
		}
		Temperature struct {
			Enabled bool
			Decimal int
		}
	}

	Ram struct {
		Enabled bool
		Decimal int
	}

	Swap struct {
		Enabled bool
		Decimal int
	}

	Storage []Drive

	Network []Interface

	Rpi struct {
		PowerStatus bool `default:"false" yaml:"power-status"`
	}

	Advanced struct {
		StartDelay int    `default:"0" yaml:"start-delay"`
		DeviceID   string `default:"auto" yaml:"device-id"`
	}
}

func Read

func Read(path string) (Configuration, error)

Read YAML Configuration

type Drive

type Drive struct {
	Drive   string
	Decimal int
}

type Interface

type Interface struct {
	Interface string
	Bitrate   string
	Decimal   int
	Ingress   bool
	Egress    bool
}

Jump to

Keyboard shortcuts

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