config

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 6 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 {
	Debug     bool             `yaml:"debug,omitempty"`
	MongoURI  string           `yaml:"mongouri"`
	EndPoints []EndpointConfig `yaml:"endpoints,omitempty"`
	WEBAPI    WEBAPIConfig     `yaml:"webapi"`
	Notifier  NotifierConfig   `yaml:"notifier,omitempty"`
}

func Load

func Load() (*Config, error)

type EndpointConfig added in v1.1.3

type EndpointConfig struct {
	Name        string        `yaml:"name"`
	Type        string        `yaml:"type"`
	Address     string        `yaml:"address"`
	Status      int           `yaml:"status"`
	PacketCount int           `yaml:"packetcount"`
	Timeout     time.Duration `yaml:"timeout"`
	Interval    time.Duration `yaml:"interval"`
}

type NotifierConfig

type NotifierConfig struct {
	Type     string `yaml:"type"`
	TgToken  string `yaml:"tgtoken,omitempty"`
	TgChatID string `yaml:"tgchatid,omitempty"`
}

type WEBAPIConfig

type WEBAPIConfig struct {
	ListenAddr string `yaml:"listenaddr"`
	AssetsDir  string `yaml:"assetsdir"`
}

Jump to

Keyboard shortcuts

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