config

package
v0.0.0-...-d221b79 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Memory = "memory"
	Redis  = "redis"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertPersistConfig

type AlertPersistConfig struct {
	ElkData ELKPersistConfig `json:"elk"` //only used for PersistType ELK
}

type AlertStoreConfig

type AlertStoreConfig struct {
	Persist PersistConfig `json:"persist"`
	Caches  []CacheConfig `json:"caches"`
}

func GetConfig

func GetConfig() AlertStoreConfig

type CacheConfig

type CacheConfig struct {
	Name  string    `json:"name"`
	Type  string    `json:"type"`
	Redis RedisInfo `json:"redis"`
}

type ELKPersistConfig

type ELKPersistConfig struct {
	IndexPattern string `json:"index"`
}

type PersistConfig

type PersistConfig struct {
	PersistResolvedAlerts AlertPersistConfig `json:"persist-resolved-alerts"`
	PersistActiveAlerts   AlertPersistConfig `json:"persist-active-alerts"`

	//User, Address, and Pass can be passed as a env variable by prepending the environment-variable name with ENV:
	Address string `json:"addr"`
	User    string `json:"user"`
	Pass    string `json:"pass"`

	UpdateInterval string `json:"update-interval"` //expected in the golang duration format
}

type PersistType

type PersistType string

type RedisInfo

type RedisInfo struct {
	URL      string `json:"url"`
	Database int    `json:"database"`
	Password string `json:"pass"`
}

Jump to

Keyboard shortcuts

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