alertmanager

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAlertManager

func InitAlertManager(vConfAlerting ConfAlerting, vigieInstName, vigieURL string) error

Types

type AlertManager

type AlertManager struct {
	sync.RWMutex
	Enable bool
	// contains filtered or unexported fields
}
var AM AlertManager

func (*AlertManager) AddToAlertList

func (am *AlertManager) AddToAlertList(task teststruct.Task) error

__________________________________________________________________________________________ AddToAlertList add the task into the AlertManager If a TxStep has no leafs => delete this TxStep on AM

func (*AlertManager) IsEnable

func (am *AlertManager) IsEnable() (enable bool)

type ConfAlerting

type ConfAlerting struct {
	Enable   bool          `toml:"enable"`
	Interval time.Duration `toml:"interval"`
	Reminder time.Duration `toml:"reminder"`
	Email    struct {
		To       string `toml:"to"`
		From     string `toml:"from"`
		Username string `toml:"username"`
		Password string `toml:"password"`
		SMTP     string `toml:"smtp"`
		Port     int    `toml:"port"`
	} `toml:"email"`
	Slack struct {
		Hook string `toml:"hook" valid:"url"`
	} `toml:"slack"`
	Discord struct {
		Hook string `toml:"hook" valid:"url"`
	} `toml:"discord"`
	Webhook struct {
		Hook string `toml:"hook" valid:"url"`
	} `toml:"webhook"`
}

Jump to

Keyboard shortcuts

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