Documentation ¶
Index ¶
- func BroadcastMessage(ctx context.Context, title string, item any) (*eventbridge.PutEventsOutput, error)
- func Send(ctx context.Context, queueURL string, item any) (*sqs.SendMessageOutput, error)
- func SendWithClient(ctx context.Context, client *clients.Client, queueURL string, item any) (*sqs.SendMessageOutput, error)
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.