sns

package
v0.0.0-...-e45c2a7 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package sns is for messaging with AWS SNS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SNS

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

func New

func New() (SNS, error)

New returns an SNS struct which wraps an SNS client using the default AWS credentials chain. This consults (in order) environment vars, config files, ec2 and ecs roles. Requests with recoverable errors will be retried with the default retrier. It is an error if the AWS_REGION environment variable is not set.

func NewWithMaxRetries

func NewWithMaxRetries(maxRetries int) (SNS, error)

NewWithMaxRetries returns the same as New(), but with the back off set to up to maxRetries times.

func (*SNS) Publish

func (s *SNS) Publish(topicArn string, message []byte) error

Publish publishes message to topicArn.

func (*SNS) Ready

func (s *SNS) Ready() bool

Ready returns whether the SNS client has been initialised.

Jump to

Keyboard shortcuts

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