notify

package
v1.1.21 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 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 Notifier

type Notifier interface {
	Push(mssg interface{}) error
}

Notifier is a connector that allows to push messages to a notification service.

type SNSConfig

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

SNSConfig holds the required SNS config information.

type SNSNotifier

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

SNSNotifier sends push events to an SNS topic.

func NewSNSNotifier

func NewSNSNotifier(conf SNSConfig, logger *log.Logger) (*SNSNotifier, error)

NewSNSNotifier creates a new SNSNotifier with the given configuration.

func (*SNSNotifier) Push

func (n *SNSNotifier) Push(message interface{}) 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