notification

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotifyError

func NotifyError(systemError error)

NotifyError sends an error notification through the configured notification system. It logs the error locally and sends a notification via Slack (if configured).

Parameters: - systemError: The error to notify.

This function runs the notification process asynchronously using a goroutine to avoid blocking.

func RegisterWebhookSender added in v0.12.0

func RegisterWebhookSender(sender WebhookSender)

RegisterWebhookSender registers a function to handle webhook sending.

func SlackNotification

func SlackNotification(err error)

SlackNotification sends an error message to a Slack webhook. It formats the error details and the current time into a Slack message payload.

Parameters: - err: The error to be reported via Slack.

The function retrieves configuration for the Slack webhook URL, formats the error, and sends it as a JSON payload to the Slack webhook.

Types

type WebhookSender added in v0.12.0

type WebhookSender func(event string, payload interface{}) error

WebhookSender defines a function signature for sending webhooks.

Jump to

Keyboard shortcuts

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