manager

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertInfo

type AlertInfo struct {
	Name       string      `json:"name"`
	Level      alert.Level `json:"level"`
	LastChange time.Time   `json:"last_change"`
	Start      time.Time   `json:"start"`
	Count      int         `json:"count"`
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func New

func New(logger *zap.Logger) *Manager

func (*Manager) GetAlerts

func (m *Manager) GetAlerts() []*AlertInfo

func (*Manager) GetLoader

func (m *Manager) GetLoader(script *script.Script) lua.LGFunction

func (*Manager) Init

func (m *Manager) Init(cfg config.Channels) error

func (*Manager) Name

func (m *Manager) Name() string

func (*Manager) Send

func (m *Manager) Send(level, alertName, text string, channels []string, fields []string, image string)

func (*Manager) Stop

func (m *Manager) Stop() error

type SendOption added in v0.1.0

type SendOption func()

Jump to

Keyboard shortcuts

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