routemgr

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RouteMgr

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

RouteMgr

func NewRouteMgr

func NewRouteMgr(config *config.RigConfig) *RouteMgr

func (*RouteMgr) AddAlert

func (rm *RouteMgr) AddAlert(alertId string, r *http.Request) (bool, error)

func (*RouteMgr) AddAlertConfig

func (rm *RouteMgr) AddAlertConfig(alertConfig *config.AlertConfig)

Add a alert configuration and create its schedule

func (*RouteMgr) DeleteAlert

func (rm *RouteMgr) DeleteAlert(alertId string) (bool, error)

Private function to delete an alert

func (*RouteMgr) GetAlerts

func (rm *RouteMgr) GetAlerts() map[string][]*ScheduledAlert

func (*RouteMgr) Route

func (rm *RouteMgr) Route(event *routers.Event) error

type ScheduleDisabler

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

Used to disable a schedule via the cron interface

func (*ScheduleDisabler) Run

func (s *ScheduleDisabler) Run()

Schedule enabler. Implements the cron interface Run function to flip the enabled flag to false

type ScheduleEnabler

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

Used to enable a schedule via the cron interface

func (*ScheduleEnabler) Run

func (s *ScheduleEnabler) Run()

Schedule enabler. Implements the cron interface Run function to flip the enabled flag to true

type ScheduledAlert

type ScheduledAlert struct {
	Config config.RouterParms
	// contains filtered or unexported fields
}

ScheduleAlert object used for cron schedules

Jump to

Keyboard shortcuts

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