amazon

package module
v0.0.0-...-b84f664 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalMessage

func MarshalMessage(message streams.Message) (*string, error)

MarshalMessage converts a streams.Message into a JSON string ready to be published to Amazon Simple Notification Service (SNS) and/or Amazon Simple Queue Service (SQS).

func NewEventBusArn

func NewEventBusArn(region, accountID, baseBusName string) *string

NewEventBusArn builds an Amazon EventBridge's Event Bus Amazon Resource Name (ARN).

func NewQueueUrl

func NewQueueUrl(region, accountID, queueName string) *string

NewQueueUrl builds an Amazon Simple Queue Service's Queue URL.

func NewTopic

func NewTopic(region, accountID, baseTopic string) *string

NewTopic builds an Amazon Simple Notification Service topic.

Types

type EventBridgeWriter

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

EventBridgeWriter is the Amazon Web Services EventBridge (formerly known as CloudWatch Events) implementation of streams.Writer.

func NewEventBridgeWriter

func NewEventBridgeWriter(c *eventbridge.Client, accountID, region, busName string) EventBridgeWriter

NewEventBridgeWriter allocates a new EventBridgeWriter ready to be used.

func (EventBridgeWriter) Write

func (e EventBridgeWriter) Write(ctx context.Context, message streams.Message) error

func (EventBridgeWriter) WriteBatch

func (e EventBridgeWriter) WriteBatch(ctx context.Context, messages ...streams.Message) (uint32, error)

type SnsWriter

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

SnsWriter is the Amazon Web Services Simple Notification Service (SNS) implementation of streams.Writer.

func NewSnsWriter

func NewSnsWriter(c *sns.Client, accountID, region string) SnsWriter

NewSnsWriter allocates a new SnsWriter ready to be used.

func (SnsWriter) Write

func (s SnsWriter) Write(ctx context.Context, message streams.Message) error

func (SnsWriter) WriteBatch

func (s SnsWriter) WriteBatch(ctx context.Context, messages ...streams.Message) (published uint32, err error)

type SqsReader

type SqsReader struct {
}

func (SqsReader) ExecuteTask

func (s SqsReader) ExecuteTask(_ context.Context, _ streams.ReaderTask) error

type SqsWriter

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

SqsWriter is the Amazon Web Services Simple Queue Service (SQS) implementation of streams.Writer.

func NewSqsWriter

func NewSqsWriter(c *sqs.Client, accountID, region string) SqsWriter

NewSqsWriter allocates a new SqsWriter ready to be used.

func (SqsWriter) Write

func (s SqsWriter) Write(ctx context.Context, message streams.Message) error

func (SqsWriter) WriteBatch

func (s SqsWriter) WriteBatch(ctx context.Context, messages ...streams.Message) (published uint32, err error)

Jump to

Keyboard shortcuts

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