notifier

package
v0.0.0-...-873df37 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

type Notifier interface {
	Notify(payload Payload) error
}

Notifier send notification to the client

type Payload

type Payload struct {
	Kind      string
	Namespace string
	Name      string
	Error     string
}

Payload holds details of the event that needs to be notified

type WebhookNotifier

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

WebhookNotifier sends notifications to webhook

func NewWebhookNotifier

func NewWebhookNotifier(webhookURL string) WebhookNotifier

NewWebhookNotifier creates new webhook notifier

func (WebhookNotifier) Notify

func (sn WebhookNotifier) Notify(payload Payload) error

Notify convers payload to a readable message and sends it to webhook webhook url

Jump to

Keyboard shortcuts

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