config

package
v0.0.0-...-f055950 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const PingInterval = 5 * time.Minute
View Source
const PingTimeWarnThreshold = 1500 * time.Millisecond
View Source
const ReceiveDelayWarnThreshold = 5 * time.Second
View Source
const RemoteSendDelayWarnThreshold = 1500 * time.Millisecond
View Source
const WebAverageInterval = 15 * time.Minute
View Source
const WebWarnStatusThreshold = 1500 * time.Millisecond

Variables

View Source
var Path = "monitor-bot.yaml"
View Source
var Runtime = &runtimeConfig{}

Functions

func ReloadConfig

func ReloadConfig() error

Types

type BotConfig

type BotConfig struct {
	Homeserver *HomeserverConfig `yaml:"homeserver"`
	Monitor    *MonitorConfig    `yaml:"monitor"`
	Metrics    *MetricsConfig    `yaml:"metrics"`
	Webserver  *WebserverConfig  `yaml:"webserver"`
	Logging    *LoggingConfig    `yaml:"logging"`
}

func Get

func Get() *BotConfig

func NewDefaultConfig

func NewDefaultConfig() *BotConfig

type HomeserverConfig

type HomeserverConfig struct {
	Url         string `yaml:"url"`
	AccessToken string `yaml:"accessToken"`
}

type LoggingConfig

type LoggingConfig struct {
	Directory string `yaml:"directory"`
}

type MetricsConfig

type MetricsConfig struct {
	Enabled bool   `yaml:"enabled"`
	Bind    string `yaml:"bind"`
	Port    int    `yaml:"port"`
}

type MonitorConfig

type MonitorConfig struct {
	Rooms           [][]string `yaml:"rooms,flow"`
	AllowOtherRooms bool       `yaml:"allowOtherRooms"`
}

type WebserverConfig

type WebserverConfig struct {
	WithClient              bool     `yaml:"serveClient"`
	Bind                    string   `yaml:"bind"`
	Port                    int      `yaml:"port"`
	RelativePath            string   `yaml:"relativePath"`
	DefaultCompareDomain    string   `yaml:"defaultCompareDomain"`
	DefaultCompareToDomains []string `yaml:"compareDefaultDomains,flow"`
	FeaturedCompareDomains  []string `yaml:"featuredCompareDomains,flow"`
}

Jump to

Keyboard shortcuts

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