alertstore

package
v0.0.0-...-d221b79 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Init      = "init"
	Interface = "interface"
	Cache     = "cache"
)

Variables

View Source
var ZeroTime = time.Time{}

Functions

func AddAlert

func AddAlert(a structs.Alert) (string, *nerr.E)

AddAlert takes an alert and stores it in the store. It will return the AlertID.

func AddRoomInformationToAlert

func AddRoomInformationToAlert(a structs.Alert) (structs.Alert, *nerr.E)

AddRoomInformationToAlert will check A) System Type B) Designation C) Maintenence Mode D) Monitoring

func AddSystemTypeToIssue

func AddSystemTypeToIssue(issue structs.RoomIssue) (structs.RoomIssue, *nerr.E)

will check the system_type

func GenerateAlertID

func GenerateAlertID(a structs.Alert) string

GenerateAlertID will give you the generated id back

func GenerateIssueID

func GenerateIssueID(a structs.Alert) string

func GetAllIssues

func GetAllIssues() ([]structs.RoomIssue, *nerr.E)

GetAllIssues .

func GetIssueIDFromAlertID

func GetIssueIDFromAlertID(alertID string) string

for now it's the same as the roomID

func GetRoomIssue

func GetRoomIssue(IssueID string) (structs.RoomIssue, *nerr.E)

GetRoomIssue Gets a specific roomIssue by IssueID

func InitializeAlertStore

func InitializeAlertStore(a *actions.ActionManager)

func ParseRoomFromAlertID

func ParseRoomFromAlertID(alertID string) string

ParseRoomFromID .

func ParseSeverityFromID

func ParseSeverityFromID(alertID string) string

func ResolveIssue

func ResolveIssue(resInfo structs.ResolutionInfo, id string) *nerr.E

ResolveIssue .

func ResolvePartialIssue

func ResolvePartialIssue(resInfo structs.ResolutionInfo, id string, alertIDs []string) *nerr.E

ResolvePartialIssue .

func UpdateRoomIssue

func UpdateRoomIssue(i structs.RoomIssue) *nerr.E

UpdateRoomIssue .

Types

type ChannelStatus

type ChannelStatus struct {
	Cap int `json:"cap"`
	Len int `json:"len"`
}

type Status

type Status struct {
	QueueStatus map[string]ChannelStatus
}

func GetQueueStatus

func GetQueueStatus() Status

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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