slack

package
v0.47.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 14 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*SlackOutput)

Option configures SlackOutput.

func WithEventTypes

func WithEventTypes(types map[string]bool) Option

WithEventTypes sets the enabled event types.

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

WithHTTPClient sets the HTTP client used to deliver messages.

func WithLogger

func WithLogger(logger plugin.Logger) Option

WithLogger sets the plugin logger.

func WithMaxRetries

func WithMaxRetries(retries int) Option

WithMaxRetries sets zero to three retries after the first delivery attempt.

func WithWebhookURLs

func WithWebhookURLs(urls ...string) Option

WithWebhookURLs sets the Slack destinations. Each URL carries its own authentication secret.

type SlackOutput

type SlackOutput struct {
	plugin.Base
	// contains filtered or unexported fields
}

SlackOutput delivers selected Adder events to Slack incoming webhooks.

func New

func New(options ...Option) *SlackOutput

New builds a Slack output. Plugin configuration validates URLs and event names.

func (*SlackOutput) Role

func (s *SlackOutput) Role() plugin.PluginType

Role identifies this plugin as a pipeline output.

func (*SlackOutput) Start

func (s *SlackOutput) Start() error

Start begins delivery using a background worker.

func (*SlackOutput) StartContext

func (s *SlackOutput) StartContext(ctx context.Context) error

StartContext starts the output under ctx.

func (*SlackOutput) Stop

func (s *SlackOutput) Stop() error

Stop waits for the delivery worker to exit.

Jump to

Keyboard shortcuts

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