Documentation
¶
Index ¶
- func NewConsoleNotifier() interfaces.Notifier
- func NewSlackNotifier() interfaces.Notifier
- type ConsoleNotifier
- func (n *ConsoleNotifier) NotifyEnrichPolicyResult(ctx context.Context, ev *event.EnrichPolicyResultEvent)
- func (n *ConsoleNotifier) NotifyEnrichTaskPrompt(ctx context.Context, ev *event.EnrichTaskPromptEvent)
- func (n *ConsoleNotifier) NotifyEnrichTaskResponse(ctx context.Context, ev *event.EnrichTaskResponseEvent)
- func (n *ConsoleNotifier) NotifyError(ctx context.Context, ev *event.ErrorEvent)
- func (n *ConsoleNotifier) NotifyIngestPolicyResult(ctx context.Context, ev *event.IngestPolicyResultEvent)
- func (n *ConsoleNotifier) NotifyTriagePolicyResult(ctx context.Context, ev *event.TriagePolicyResultEvent)
- type SlackNotifier
- func (n *SlackNotifier) NotifyEnrichPolicyResult(ctx context.Context, ev *event.EnrichPolicyResultEvent)
- func (n *SlackNotifier) NotifyEnrichTaskPrompt(ctx context.Context, ev *event.EnrichTaskPromptEvent)
- func (n *SlackNotifier) NotifyEnrichTaskResponse(ctx context.Context, ev *event.EnrichTaskResponseEvent)
- func (n *SlackNotifier) NotifyError(ctx context.Context, ev *event.ErrorEvent)
- func (n *SlackNotifier) NotifyIngestPolicyResult(ctx context.Context, ev *event.IngestPolicyResultEvent)
- func (n *SlackNotifier) NotifyTriagePolicyResult(ctx context.Context, ev *event.TriagePolicyResultEvent)
- func (n *SlackNotifier) PublishAlert(ctx context.Context, slackService SlackServicePoster, ...) (interfaces.SlackThreadService, error)
- func (n *SlackNotifier) PublishNotice(ctx context.Context, slackService SlackServiceNotice, notice *notice.Notice, ...) (string, error)
- type SlackServiceNotice
- type SlackServicePoster
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