notifier

package
v6.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package notifier defines an interface for the system to send messages regarding various system events that the engineering team should be immediately aware of. It can be used in incident reporting.

Index

Constants

View Source
const (
	NotificationCode4XX = "4XX" // Notification code for 4XX errors (client errors).
	NotificationCode5XX = "5XX" // Notification code for 5XX errors (server errors).
)

Constants representing notification codes for different types of errors.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

type Notifier interface {
	// Notify5XX sends a notification for 5XX errors (server errors).
	Notify5XX(ctx context.Context, errorCode string, err error, stackTrace string, errorData interface{}) error

	// Notify4XX sends a notification for 4XX errors (client errors).
	Notify4XX(ctx context.Context, errorCode string, err error, stackTrace string, errorData interface{}) error
}

Notifier defines an interface for sending notifications about system events.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳