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).
Click to show internal directories.
Click to hide internal directories.