Documentation
¶
Index ¶
- Constants
- type GremlinAlert
- type Message
- type Server
- func (a *Server) OnEdgeAdded(e *graph.Edge)
- func (a *Server) OnEdgeDeleted(e *graph.Edge)
- func (a *Server) OnEdgeUpdated(e *graph.Edge)
- func (a *Server) OnNodeAdded(n *graph.Node)
- func (a *Server) OnNodeDeleted(n *graph.Node)
- func (a *Server) OnNodeUpdated(n *graph.Node)
- func (a *Server) Start()
- func (a *Server) Stop()
Constants ¶
View Source
const (
// Namespace is the alerting WebSocket namespace
Namespace = "Alert"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GremlinAlert ¶
GremlinAlert represents an alert that will be triggered if its associated Gremlin expression returns a non empty result.
func NewGremlinAlert ¶
func NewGremlinAlert(alert *types.Alert, g *graph.Graph, p *traversal.GremlinTraversalParser) (*GremlinAlert, error)
NewGremlinAlert returns a new gremlin based alert
type Message ¶
Message describes a websocket message that is sent by the alerting server when an alert was triggered
type Server ¶
type Server struct {
common.RWMutex
common.MasterElection
Graph *graph.Graph
Pool ws.StructSpeakerPool
AlertHandler api.Handler
// contains filtered or unexported fields
}
Server describes an alerting alerts that evaluates registered alerts on graph events or periodically and trigger them if their condition evaluates to true
Click to show internal directories.
Click to hide internal directories.