notify

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDefault

func SetDefault(h *Handler)

SetDefault sets the default callback handler for step events It only updates non-nil handlers to preserve existing defaults Caller may pass a custom handler to pass message to a channel or different logging mechanism etc.

Types

type Handler

type Handler struct {
	StepStart      func(ctx context.Context, stp automa.Step, msg string, args ...interface{})
	StepCompletion func(ctx context.Context, stp automa.Step, report *automa.Report, msg string, args ...interface{})
	StepFailure    func(ctx context.Context, stp automa.Step, report *automa.Report, msg string, args ...interface{})
}

Handler defines callbacks for step events Caller may pass a custom handler to pass message to a channel or different logging mechanism or webhook (e.g. Slack).

func As

func As() *Handler

As returns the current notification handler

Jump to

Keyboard shortcuts

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