notification

package
v1.7.20 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLoadNotification

func AddLoadNotification(clients []string, name string, metric string, threshold float32, ratio float32, interval int, mode string, baselineDays int, multiplier float32, tasks []string) (uint, error)

func DeleteLoadNotification

func DeleteLoadNotification(id []uint) error

func EditLoadNotification

func EditLoadNotification(notifications []*LoadNotificationEdit) error

func GetAllLoadNotifications

func GetAllLoadNotifications() ([]models.LoadNotification, error)

func ReloadLoadNotificationSchedule

func ReloadLoadNotificationSchedule() error

Types

type LoadNotificationEdit added in v1.7.20

type LoadNotificationEdit struct {
	ID           uint       `json:"id"`
	Name         *string    `json:"name"`
	Clients      *[]string  `json:"clients"`
	Metric       *string    `json:"metric"`
	Threshold    *float32   `json:"threshold"`
	Ratio        *float32   `json:"ratio"`
	Interval     *int       `json:"interval"`
	Mode         *string    `json:"mode"`
	BaselineDays *int       `json:"baseline_days"`
	Multiplier   *float32   `json:"multiplier"`
	Tasks        *[]string  `json:"tasks"`
	LastNotified *time.Time `json:"last_notified"`
}

LoadNotificationEdit distinguishes omitted fields from explicit values; validation still restricts zeroes and retains legacy defaults where needed.

Jump to

Keyboard shortcuts

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