notify

package
v1.1.26 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Endpoint string `mapstructure:"endpoint"`
	TopicArn string `mapstructure:"topic_arn"`
	Enabled  bool   `mapstructure:"enabled"`
}

Config holds the required sqs config information.

type Notifier

type Notifier interface {
	Push(message interface{}, attributes map[string]string) error
}

Notifier represents a generic notifier API.

type SNSNotifier

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

SNSNotifier send push event to a sns topic.

func NewSNSNotifier

func NewSNSNotifier(c Config, log log.Logger) (*SNSNotifier, error)

NewSNSNotifier creates a new SNSNotifier with the given configuration.

func (*SNSNotifier) Push

func (s *SNSNotifier) Push(message interface{}, attributes map[string]string) error

Push pushes a notification to the configured sns topic.

Jump to

Keyboard shortcuts

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