publisher

package
v0.0.0-...-7f05d5b Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2017 License: MPL-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmazonNotification

type AmazonNotification struct {
	Session snsiface.SNSAPI
}

AmazonNotification is the aws sns implementation of the NotificationService

func (AmazonNotification) PublishMessage

func (service AmazonNotification) PublishMessage(msg Message) (string, error)

PublishMessage sens a message to the Amazon queueing system

func (*AmazonNotification) Setup

func (service *AmazonNotification) Setup()

Setup the function that must be run to prepare NotificationService for use

type Application

type Application interface {
	PublishMessage(msg Message) (string, error)
}

Application is the interface to specify a notification service

type Message

type Message struct {
	Message  string
	JSON     []byte
	Subject  string
	Endpoint string
}

Message is the data format send to endpoints

type Publish

type Publish interface {
	SendSimpleMessage(msg *Message)
	SendJSON(msg *Message)
}

Publish allows messages to be sent to various endpoint destinations

type Service

type Service struct {
	Application Application
	Log         logger.Log
}

Service is the base system for creating unique messaging services

type SimpleNotification

type SimpleNotification Service

SimpleNotification is a publisher sevice that sends messages directly to a service

func (*SimpleNotification) SendJSON

func (service *SimpleNotification) SendJSON(msg *Message)

SendJSON sends a strigified json object as Message to an endpoint

func (*SimpleNotification) SendSimpleMessage

func (service *SimpleNotification) SendSimpleMessage(msg *Message)

SendSimpleMessage sends a string message to an endpoint

Jump to

Keyboard shortcuts

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