ast

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2014 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CreateAction = func(props ...string) (Action, error) {
		return &SimpleAction{props[0]}, nil
	}
)

Functions

func AddParam

func AddParam(key interface{}, val interface{}, hash interface{}) (map[string]string, error)

Types

type Action

type Action interface {
	Name() string
}

func AddAction

func AddAction(name interface{}, arg interface{}) (Action, error)

func AppendAction

func AppendAction(action interface{}, list interface{}) ([]Action, error)

type Amount

type Amount struct {
	Raw    string
	Parsed int64
}

func HumanAmount

func HumanAmount(digits interface{}) (*Amount, error)

func ToInt64

func ToInt64(v interface{}) (*Amount, error)

type HostCheck

type HostCheck struct {
	Rules      []Rule
	Parameters map[string]string
}

func NewHostCheck

func NewHostCheck(rules interface{}, params interface{}) *HostCheck

type ProcessCheck

type ProcessCheck struct {
	Name       string
	Rules      RuleList
	Parameters map[string]string
}

func NewProcessCheck

func NewProcessCheck(checkType interface{}, name interface{}, rules interface{}, params interface{}) *ProcessCheck

type Rule

type Rule struct {
	Metric     RuleMetric
	Operator   string
	Threshold  Amount
	Actions    []Action
	CycleCount int
}

func NewRule

func NewRule(metric interface{}, operator interface{}, value interface{}, actions interface{}, cycleCount interface{}) Rule

type RuleList

type RuleList []Rule

func AppendRule

func AppendRule(list interface{}, rule interface{}) RuleList

func NewRuleList

func NewRuleList(rule interface{}) RuleList

type RuleMetric

type RuleMetric struct {
	Family string
	Name   string
}

func Metric

func Metric(family interface{}, name interface{}) (*RuleMetric, error)

type SimpleAction

type SimpleAction struct {
	ActionName string
}

func (*SimpleAction) Name

func (s *SimpleAction) Name() string

Jump to

Keyboard shortcuts

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