message

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BroadcastMessage

func BroadcastMessage(ctx context.Context, title string, item any) (*eventbridge.PutEventsOutput, error)

BroadcastMessage accepts a json.Marshaller item and a title string. The item marshals itself into byte data and attaches itself as a string to the "detail" portion of an EventBridge event. EventBridge can trigger various other aws services using pattern matching against the fields of this "detail" object, as well as against the title provided as an argument to this function. It automatically broadcasts these events to the bus defined by the EVENT_BUS_NAME env var and it also attaches the AWS_LAMBDA_FUNCTION_NAME as the source of the event. Ensure your EB rules exist on the EVENT_BUS_NAME bus.

func Send

func Send(ctx context.Context, queueURL string, item any) (*sqs.SendMessageOutput, error)

SendMessage accepts an item and sends it to the SQS queue url provided by the queueURL argument

func SendWithClient

func SendWithClient(ctx context.Context, client *clients.Client, queueURL string, item any) (*sqs.SendMessageOutput, error)

SendWithClient accepts any item and sends it to the SQS queue url provided by the queueURL argument using the client provided by the ctx argument

Types

This section is empty.

Jump to

Keyboard shortcuts

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