alert

package
v0.0.0-...-fb247b5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package alert alert rules and templatize.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	Name     string            `yaml:"name"`
	Interval string            `yaml:"interval"`
	Type     string            `yaml:"type"`
	Exchange string            `yaml:"exchange"`
	Base     string            `yaml:"base"`
	Quote    string            `yaml:"quote"`
	Process  luautil.LuaRunner `yaml:"process"`

	Jobber *jobber.FullTimeSpec
}

Alert encompasses a search query which will be run periodically, the results of which will be checked against a condition. If the condition returns true a set of actions will be performed

func (Alert) CreateSearch

func (a Alert) CreateSearch(c context.Context) (string, string, interface{}, error)

func (*Alert) Init

func (a *Alert) Init() error

Init initializes some internal data inside the Alert, and must be called after the Alert is unmarshaled from yaml (or otherwise created)

func (Alert) Run

func (a Alert) Run()

Jump to

Keyboard shortcuts

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