Help us shape the future of Go! Take the 2026 Go Developer Survey

notification

package
v0.52.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package notification performs the project notification settings workflows behind the volcano notifications subcommands.

Index

Constants

When a failing scheduler is announced.

View Source
const (
	MinThreshold = 1
	MaxThreshold = 100
)

Threshold bounds, as the API enforces them.

View Source
const MaxRecipients = 10

MaxRecipients is the most email recipients the API accepts.

Variables

This section is empty.

Functions

func NotifyOnValues

func NotifyOnValues() []string

NotifyOnValues lists the accepted --notify-on values.

Types

type Service

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

Service performs notification settings workflows against the current project.

func NewService

func NewService(deps cliruntime.Deps) Service

NewService returns a notification settings service.

func (Service) Get

Get returns the current project's notification settings.

func (Service) RotateWebhookSecret

func (s Service) RotateWebhookSecret(ctx context.Context) (*apiclient.NotificationSettings, error)

RotateWebhookSecret replaces the current project's webhook signing secret.

func (Service) SendTest

SendTest sends a test notification on every channel the current project has configured.

func (Service) Update

func (s Service) Update(ctx context.Context, update Update) (*apiclient.NotificationSettings, error)

Update applies update to the current project's notification settings.

type Update

type Update struct {
	EmailEnabled     *bool
	Recipients       *[]string
	WebhookURL       *string
	NotifyOn         *string
	Threshold        *int
	NotifyOnRecovery *bool
}

Update is a settings change. A nil field keeps its current value.

func (Update) Empty

func (u Update) Empty() bool

Empty reports whether u changes nothing.

func (Update) Validate

func (u Update) Validate() error

Validate refuses what the API would, before the request is sent.

Jump to

Keyboard shortcuts

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