queue

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: 10 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterQueue

func RegisterQueue(awsSession *session.Session, clusterName, name string) (queueURL, queueARN string, err error)

RegisterQueue wkll create the Queue so it is accessible to SNS.

func SetQueuePolicy

func SetQueuePolicy(config config.Config, manager *queuemanager.QueueManager) error

func Subscribe

func Subscribe(config config.Config, manager *queuemanager.QueueManager, ctx context.Context)

Subscribe will listen to the global queue and distribute messages

Types

type ArnEquals

type ArnEquals struct {
	AwsSourceArn string `json:"aws:SourceArn"`
}

ArnEquals is a mapping for the SourceArn

type Condition

type Condition struct {
	ArnEquals ArnEquals `json:"ArnEquals"`
}

Condition defines the Condition for Statments

type Policy

type Policy struct {
	Version   string      `json:"Version"`
	ID        string      `json:"Id"`
	Statement []Statement `json:"Statement"`
}

Policy wraps the JSON policy

type Queue

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

Queue wraps the config object for updating

func New

func New(config config.Config, awsclientset awsclient.ServiceoperatorV1alpha1Interface, timeout int) *Queue

New will initialize the Queue object for watching

func (*Queue) Register

func (q *Queue) Register(name string) (topicARN string, subARN string)

Register will create all the affilate resources

type Statement

type Statement struct {
	Sid       string    `json:"Sid"`
	Effect    string    `json:"Effect"`
	Principal string    `json:"Principal"`
	Action    []string  `json:"Action"`
	Resource  string    `json:"Resource"`
	Condition Condition `json:"Condition"`
}

Statement defines the QueuePolicy Statement

Jump to

Keyboard shortcuts

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