notifier

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const NotifierNoop = "noop"
View Source
const NotifierSlack = "slack"

Variables

View Source
var DefaultTimeout = 10 * time.Second
View Source
var NotificationColor = "#F35A00"

Functions

This section is empty.

Types

type Noop

type Noop struct {
	Calls int
}

func (*Noop) NotifyPodTermination

func (t *Noop) NotifyPodTermination(pod v1.Pod) error

type Notifier

type Notifier interface {
	NotifyPodTermination(pod v1.Pod) error
}

type Notifiers

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

func New

func New() *Notifiers

func (*Notifiers) Add

func (m *Notifiers) Add(notifier Notifier)

func (*Notifiers) NotifyPodTermination

func (m *Notifiers) NotifyPodTermination(pod v1.Pod) error

type Slack

type Slack struct {
	Webhook string
	Client  *http.Client
}

func NewSlackNotifier

func NewSlackNotifier(webhook string) *Slack

func (Slack) NotifyPodTermination

func (s Slack) NotifyPodTermination(pod v1.Pod) error

Jump to

Keyboard shortcuts

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