notify

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Multi

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

Multi composites multiple notifiers.

func NewMulti

func NewMulti(notifiers ...Notifier) *Multi

NewMulti creates a new Multi.

func (*Multi) Notify

func (m *Multi) Notify(ctx context.Context, summary string) error

Notify routes notifications to all registered notifiers.

type Notifier

type Notifier interface {
	Notify(ctx context.Context, summary string) error
}

Notifier defines how a stats summary is delivered.

type SlackNotifier

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

SlackNotifier delivers statistics summaries to a Slack channel.

func NewSlackNotifier

func NewSlackNotifier(token, channelID string) *SlackNotifier

NewSlackNotifier creates a new SlackNotifier.

func (*SlackNotifier) Notify

func (s *SlackNotifier) Notify(ctx context.Context, summary string) error

Notify implements Notifier by posting to Slack using context.

type StdoutNotifier

type StdoutNotifier struct{}

StdoutNotifier writes the summary to stdout.

func (*StdoutNotifier) Notify

func (s *StdoutNotifier) Notify(_ context.Context, summary string) error

Notify implements Notifier by writing to stdout.

Jump to

Keyboard shortcuts

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