notify

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package notify is the notify node of docflow: it tells that a job passed it, to Slack (an incoming webhook), by mail, or to a webhook of one's own (http), and sends the job on along its To, if any, with what reached it. Failures reach it along the on_error edges of the nodes (and the manager's default, Options.OnError), with $error and $error_node in the metadata it sees. A program that imports the package has the kind. (2026-10-23: the user chose a node in the graph, and on_error edges with a default of the whole.)

What it tells is its Text, expanding {{meta.<key>}}; by default the job, the node and, of a failure, the error. It sends no payload. By slack, the credential is the webhook's URL (a secret); by http, the node's URL gets a JSON object (text, job, name, node, error, error_node, meta) with the credential as the Authorization; by mail, the settings are a mail's (docflow/io/smtp), without an attachment. A notification is sent at least once: a webhook gets the delivery's id as the Idempotency-Key, a mail as its Message-ID.

Index

Constants

View Source
const (
	ViaSlack = "slack"
	ViaMail  = "mail"
	ViaHTTP  = "http"
)

The ways a notify node tells.

View Source
const KindNotify = "notify"

KindNotify is the kind of the notify node.

Variables

This section is empty.

Functions

func Text

func Text(o *docflow.Out) string

Text is what a notification says: the node's Text, expanded, or the default.

Types

This section is empty.

Jump to

Keyboard shortcuts

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