notifier

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsoleNotifier

func NewConsoleNotifier() interfaces.Notifier

NewConsoleNotifier creates a new console notifier

func NewSlackNotifier

func NewSlackNotifier() interfaces.Notifier

NewSlackNotifier creates a new Slack notifier that buffers events and flushes to thread on publish

Types

type ConsoleNotifier

type ConsoleNotifier struct{}

ConsoleNotifier is a console-based event notifier that outputs alert pipeline events to the console with color formatting. Useful for CLI mode and debugging.

func (*ConsoleNotifier) NotifyEnrichPolicyResult

func (n *ConsoleNotifier) NotifyEnrichPolicyResult(ctx context.Context, ev *event.EnrichPolicyResultEvent)

func (*ConsoleNotifier) NotifyEnrichTaskPrompt

func (n *ConsoleNotifier) NotifyEnrichTaskPrompt(ctx context.Context, ev *event.EnrichTaskPromptEvent)

func (*ConsoleNotifier) NotifyEnrichTaskResponse

func (n *ConsoleNotifier) NotifyEnrichTaskResponse(ctx context.Context, ev *event.EnrichTaskResponseEvent)

func (*ConsoleNotifier) NotifyError

func (n *ConsoleNotifier) NotifyError(ctx context.Context, ev *event.ErrorEvent)

func (*ConsoleNotifier) NotifyIngestPolicyResult added in v0.7.0

func (n *ConsoleNotifier) NotifyIngestPolicyResult(ctx context.Context, ev *event.IngestPolicyResultEvent)

func (*ConsoleNotifier) NotifyTriagePolicyResult added in v0.7.0

func (n *ConsoleNotifier) NotifyTriagePolicyResult(ctx context.Context, ev *event.TriagePolicyResultEvent)

type SlackNotifier

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

SlackNotifier is a Slack-based event notifier that buffers alert pipeline events and posts them to a Slack thread when the alert is published. Provides real-time visibility into alert processing for team collaboration.

func (*SlackNotifier) NotifyEnrichPolicyResult

func (n *SlackNotifier) NotifyEnrichPolicyResult(ctx context.Context, ev *event.EnrichPolicyResultEvent)

func (*SlackNotifier) NotifyEnrichTaskPrompt

func (n *SlackNotifier) NotifyEnrichTaskPrompt(ctx context.Context, ev *event.EnrichTaskPromptEvent)

func (*SlackNotifier) NotifyEnrichTaskResponse

func (n *SlackNotifier) NotifyEnrichTaskResponse(ctx context.Context, ev *event.EnrichTaskResponseEvent)

func (*SlackNotifier) NotifyError

func (n *SlackNotifier) NotifyError(ctx context.Context, ev *event.ErrorEvent)

func (*SlackNotifier) NotifyIngestPolicyResult added in v0.7.0

func (n *SlackNotifier) NotifyIngestPolicyResult(ctx context.Context, ev *event.IngestPolicyResultEvent)

func (*SlackNotifier) NotifyTriagePolicyResult added in v0.7.0

func (n *SlackNotifier) NotifyTriagePolicyResult(ctx context.Context, ev *event.TriagePolicyResultEvent)

func (*SlackNotifier) PublishAlert

func (n *SlackNotifier) PublishAlert(ctx context.Context, slackService SlackServicePoster, alertToPublish *alert.Alert) (interfaces.SlackThreadService, error)

PublishAlert posts the alert to Slack and flushes all buffered pipeline events to the thread This method combines alert posting with pipeline event flushing to avoid duplication

func (*SlackNotifier) PublishNotice

func (n *SlackNotifier) PublishNotice(ctx context.Context, slackService SlackServiceNotice, notice *notice.Notice, channel string, llmResponse *alert.GenAIResponse) (string, error)

PublishNotice posts the notice to Slack and flushes all buffered pipeline events to the thread This method combines notice posting with pipeline event flushing to avoid duplication

type SlackServiceNotice

type SlackServiceNotice interface {
	PostNotice(ctx context.Context, channelID, message string, noticeID fmt.Stringer) (string, error)
	PostNoticeThreadDetails(ctx context.Context, channelID, threadTS string, alert *alert.Alert, llmResponse *alert.GenAIResponse) error
	NewThread(thread slack.Thread) interfaces.SlackThreadService
}

SlackServiceNotice is an interface for posting notices to Slack

type SlackServicePoster

type SlackServicePoster interface {
	PostAlert(ctx context.Context, alert *alert.Alert) (interfaces.SlackThreadService, error)
}

SlackServicePoster is an interface for posting alerts to Slack

Jump to

Keyboard shortcuts

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