alerts

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package alerts contains a client to query RBFS alerts

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	// AlertName holds the alert rule name
	AlertName string `json:"name"`
	// Summary holds the alert summary.
	Summary string `json:"summary"`
	// Level holds the alert level.
	Level int `json:"level"`
	// DateCreated holds the alert creation time.
	DateCreated time.Time `json:"date_created"`
}

Alert describes a single switch alert.

type Client

type Client interface {
	// QueryAlerts returns a list of firing alerts.
	QueryAlerts(ctx rbfs.RbfsContext) ([]Alert, error)
}

Client providess access to the switch metrics.

func NewClient

func NewClient(c *http.Client) Client

NewClient creates a new client to query switch alerts.

Jump to

Keyboard shortcuts

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