config

package
v0.0.0-...-39b5b32 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2017 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	Notify      bool
	Sender      string
	Emails      []string
	Destination string
	Attempts    uint
}

type Config

type Config struct {
	Settings Settings
	Servers  map[string]server.Server
	Alert    Alert
	Smtp     SMTP
	Monitor  []monitor.Monitor
}

Config defines a configuration file structure

func Load

func Load(cf string) (Config, error)

func (*Config) InitMonitors

func (cf *Config) InitMonitors() monitor.Monitors

func (*Config) InitServers

func (cf *Config) InitServers() server.Servers

func (*Config) SetDefaults

func (cf *Config) SetDefaults()

type SMTP

type SMTP struct {
	Username string
	Password string
	Server   string
}

type Settings

type Settings struct {
	Interval uint64
}

Jump to

Keyboard shortcuts

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