notifier

package
v0.0.0-...-b8ff64e Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2018 License: MIT Imports: 9 Imported by: 1

Documentation

Overview

Package notifier provides clients for sending messages to SNS and SQS.

Index

Constants

This section is empty.

Variables

View Source
var (
	Retrier = &common.Retrier{
		Times:         3,
		BackoffFactor: 2,
	}
)

Functions

This section is empty.

Types

type MessageCreator

type MessageCreator map[string]func(...interface{}) (string, error)

func (*MessageCreator) RegisterMessageType

func (m *MessageCreator) RegisterMessageType(name string, messageType func(...interface{}) (string, error))

func (*MessageCreator) SignBody

func (m *MessageCreator) SignBody(messageType string, args ...interface{}) (string, error)

type SNSClient

type SNSClient struct {
	Signer *MessageCreator
	// contains filtered or unexported fields
}

func BuildSNSClient

func BuildSNSClient(client snsiface.SNSAPI) *SNSClient

func (*SNSClient) SendMessage

func (s *SNSClient) SendMessage(messageType, topicARN string, args ...interface{}) error

type SQSClient

type SQSClient struct {
	Signer *MessageCreator
	// contains filtered or unexported fields
}

func BuildSQSClient

func BuildSQSClient(client sqsiface.SQSAPI) *SQSClient

func (*SQSClient) SendMessage

func (s *SQSClient) SendMessage(messageType, qName string, args ...interface{}) error

Jump to

Keyboard shortcuts

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