queuemanager

package
v0.0.1-alpha4 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: Apache-2.0 Imports: 5 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	HandleMessage(config config.Config, msg *MessageBody) error
}

Handler allows a custom function to be passed

type HandlerFunc

type HandlerFunc func(config config.Config, msg *MessageBody) error

HandlerFunc allows you to define a custom function for when a message is stored

func (HandlerFunc) HandleMessage

func (f HandlerFunc) HandleMessage(config config.Config, msg *MessageBody) error

HandleMessage will stub the handler for processing messages

type MessageBody

type MessageBody struct {
	Type               string `json:"Type"`
	TopicARN           string `json:"TopicArn"`
	Message            string `json:"Message"`
	ParsedMessage      map[string]string
	Namespace          string
	ResourceName       string
	ResourceProperties ResourceProperties
	Updatable          bool
}

MessageBody will parse the message from the Body of SQS

func (*MessageBody) IsComplete

func (m *MessageBody) IsComplete() bool

IsComplete returns a simple status instead of the raw CFT resp

func (*MessageBody) ParseMessage

func (m *MessageBody) ParseMessage() error

ParseMessage will take the message attribute and make it readable

type QueueManager

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

Queue Manager allows you to register topics and a handler function

func New

func New() *QueueManager

New will return the QueueManager

func (*QueueManager) Add

func (q *QueueManager) Add(name string, handlerFunc Handler)

Add will add a new handler func

func (*QueueManager) Get

func (q *QueueManager) Get(name string) (handler Handler, ok bool)

Get will return the handler func

func (*QueueManager) Keys

func (q *QueueManager) Keys() []string

Keys will return the list of topic ARNs

type ResourceProperties

type ResourceProperties struct {
	Tags []Tag `json:"Tags"`
}

ResourceProperties will wrap the ResourceProperties object

type Tag

type Tag struct {
	Key   string `json:"Key"`
	Value string `json:"Value"`
}

Tag represents a Tag

Jump to

Keyboard shortcuts

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