config

package
v0.0.0-...-3651c1b Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: Apache-2.0 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 {
	General  ConfigGeneral
	Mail     ConfigSmtp
	Mailgun  ConfigMailgun
	Slack    ConfigSlack
	Udp      ConfigBind
	Tcp      ConfigBind
	Http     ConfigBind
	Database ConfigDatabase
	Metrics  ConfigMetrics
	Alarms   []ConfigAlarm
	Alerts   map[string]ConfigAlert
	Eventlog ConfigEventlog
	Notify   []ConfigNotify
}

func ReadConfig

func ReadConfig(fname string, dirname string) (conf Config, err error)

type ConfigAlarm

type ConfigAlarm struct {
	Name     string
	Pattern  string
	Includes []string
	Excludes []string
	Alerts   []string
}

type ConfigAlert

type ConfigAlert struct {
	Mail         string
	Webhook      string
	SlackChannel string `toml:"slack_channel"`
	Script       string
}

type ConfigBind

type ConfigBind struct {
	Listen string
}

type ConfigDatabase

type ConfigDatabase struct {
	Filename string
	Interval int

	RemoteS3Url    string `toml:"remote_s3_url"`
	RemoteS3Region string `toml:"remote_s3_region"`
}

type ConfigEventlog

type ConfigEventlog struct {
	Path string
	Mode os.FileMode
}

type ConfigGeneral

type ConfigGeneral struct {
	PublicUrl string `toml:"public_url"`
}

type ConfigMailgun

type ConfigMailgun struct {
	From   string
	Domain string
	ApiKey string `toml:"api_key"`
}

type ConfigMetrics

type ConfigMetrics struct {
	Server string
	Prefix string
}

type ConfigNotify

type ConfigNotify struct {
	Lovebeat string
}

type ConfigSlack

type ConfigSlack struct {
	WebhookUrl string `toml:"webhook_url"`
}

type ConfigSmtp

type ConfigSmtp struct {
	From   string
	Server string
}

Jump to

Keyboard shortcuts

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