sns

package
v0.1.65 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAlertMethod

func NewAlertMethod(config *AlertMethodConfig) (alert.Method, error)

NewAlertMethod creates a new *AlertMethod or a non-nil error if there was an error.

Types

type AlertMethod

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

AlertMethod implements the alert.AlertMethod interface for publishing new alerts to an AWS SNS topic.

func (*AlertMethod) Write

func (a *AlertMethod) Write(ctx context.Context, rule string, records []*alert.Record) error

Write renders the pre-defined message template and publishes the message to an AWS SNS topic.

type AlertMethodConfig

type AlertMethodConfig struct {
	Region   string `mapstructure:"region"`
	TopicARN string `mapstructure:"topic_arn"`
	Template string `mapstructure:"template"`
}

AlertMethodConfig configures where AWS SNS alerts will be published and what the published messages should look like.

Jump to

Keyboard shortcuts

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