notification

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package notification sends user notifications through the notifier and copies them to developer-notifications, in the format process-incident-api uses today (INC-02), and is the task type "notification" of processes (Task, BPMN-09).

Index

Constants

View Source
const TaskType = "notification"
View Source
const Topic = "processes"

Topic of process notifications in the notifier, as before.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

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

func New

func New(notifierUrl string, developerNotificationsUrl string, logger *slog.Logger) *Notifier

New creates a notifier; an empty URL disables the respective target.

func (*Notifier) Notify

func (this *Notifier) Notify(ctx context.Context, n store.Notification) error

Notify returns an error if the notifier did not accept the message, so that it is retried. developer-notifications gets a copy, best effort.

func (*Notifier) Send

func (this *Notifier) Send(ctx context.Context, n store.Notification) error

Send delivers to the notifier only, e.g. for notifications a process sends (BPMN-09).

type Sender

type Sender interface {
	Send(ctx context.Context, n store.Notification) error
}

type Task

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

Task is the task type "notification" (BPMN-09): it sends a notification to the owner of the instance, which process-deployment did by filling an http-connector.

func NewTask

func NewTask(sender Sender) *Task

func (*Task) Execute

func (this *Task) Execute(ctx context.Context, task engine.Task) (engine.TaskResult, error)

Execute sends title and message; a failed delivery is retried by the engine.

Jump to

Keyboard shortcuts

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