alert

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Namespace Alert
	Namespace = "Alert"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertMessage

type AlertMessage struct {
	UUID       string
	Timestamp  time.Time
	ReasonData interface{}
}

type AlertServer

type AlertServer struct {
	sync.RWMutex
	*etcd.EtcdMasterElector
	Graph        *graph.Graph
	Pool         shttp.WSJSONSpeakerPool
	AlertHandler api.Handler
	// contains filtered or unexported fields
}

func NewAlertServer

func NewAlertServer(ah api.Handler, pool shttp.WSJSONSpeakerPool, parser *traversal.GremlinTraversalParser, etcdClient *etcd.EtcdClient) *AlertServer

func (*AlertServer) EvaluateAlerts

func (a *AlertServer) EvaluateAlerts(alerts map[string]*GremlinAlert)

func (*AlertServer) OnEdgeAdded

func (a *AlertServer) OnEdgeAdded(e *graph.Edge)

func (*AlertServer) OnEdgeDeleted

func (a *AlertServer) OnEdgeDeleted(e *graph.Edge)

func (*AlertServer) OnEdgeUpdated

func (a *AlertServer) OnEdgeUpdated(e *graph.Edge)

func (*AlertServer) OnNodeAdded

func (a *AlertServer) OnNodeAdded(n *graph.Node)

func (*AlertServer) OnNodeDeleted

func (a *AlertServer) OnNodeDeleted(n *graph.Node)

func (*AlertServer) OnNodeUpdated

func (a *AlertServer) OnNodeUpdated(n *graph.Node)

func (*AlertServer) RegisterAlert

func (a *AlertServer) RegisterAlert(apiAlert *api.Alert) error

func (*AlertServer) Start

func (a *AlertServer) Start()

func (*AlertServer) Stop

func (a *AlertServer) Stop()

func (*AlertServer) TriggerAlert

func (a *AlertServer) TriggerAlert(al *GremlinAlert, data interface{}) error

func (*AlertServer) UnregisterAlert

func (a *AlertServer) UnregisterAlert(id string)

type GremlinAlert

type GremlinAlert struct {
	*api.Alert
	// contains filtered or unexported fields
}

func NewGremlinAlert

func NewGremlinAlert(alert *api.Alert, p *traversal.GremlinTraversalParser) (*GremlinAlert, error)

func (*GremlinAlert) Evaluate

func (ga *GremlinAlert) Evaluate() (interface{}, error)

func (*GremlinAlert) Trigger

func (ga *GremlinAlert) Trigger(payload []byte) error

Jump to

Keyboard shortcuts

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