notifier

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 6 Imported by: ? modules, 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

func SendPlaintextMessage

func SendPlaintextMessage(ctx context.Context, notifiers []Bot, msg string) error

SendPlaintextMessage sends a plaintext message to specified providers.

Types

type Bot added in v1.0.0

type Bot interface {

	// SendMessageToAll is used for notifying about Botkube start/stop listening, possible Botkube upgrades and other events.
	// Some integrations may decide to ignore such messages and have SendMessage method no-op.
	// TODO: Consider option per channel to turn on/off "announcements" (Botkube start/stop/upgrade, notify/config change).
	SendMessageToAll(context.Context, interactive.CoreMessage) error

	// SendMessage sends a generic message for a given source bindings.
	SendMessage(context.Context, interactive.CoreMessage, []string) error

	// IntegrationName returns a name of a given communication platform.
	IntegrationName() config.CommPlatformIntegration

	// Type returns a given integration type. See config.IntegrationType for possible integration types.
	Type() config.IntegrationType
}

Bot sends event notifications and messages on the communication channels.

type Platform added in v1.13.0

type Platform interface {
	GetStatus() health.PlatformStatus
	IntegrationName() config.CommPlatformIntegration
}

Platform represents platform notifier

type Sink added in v1.0.0

type Sink interface {
	// SendEvent sends a generic event for a given source bindings.
	SendEvent(context.Context, any, []string) error

	// IntegrationName returns a name of a given communication platform.
	IntegrationName() config.CommPlatformIntegration

	// Type returns a given integration type. See config.IntegrationType for possible integration types.
	Type() config.IntegrationType

	// GetStatus gets sink status
	GetStatus() health.PlatformStatus
}

Sink sends event notifications to the sinks.

Jump to

Keyboard shortcuts

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