Documentation
¶
Overview ¶
Package awsmsg speaks to Amazon SQS and SNS with the standard library and the shared Signature Version 4 signer.
The same argument as s3put: the AWS SDK would double the size of the bill of materials for four API calls. SQS uses its JSON protocol (AWS JSON 1.0, X-Amz-Target AmazonSQS.<Action>), which AWS documents as the current one; SNS uses its query protocol, which is the only one it has. Both work against LocalStack and VPC endpoints through an endpoint override.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Region string
Credentials awsv4.Credentials
// Endpoint overrides AWS's host: LocalStack, ElasticMQ, a VPC endpoint. Empty means AWS for the region.
Endpoint string
// HTTPClient defaults to one with a timeout longer than the longest SQS long poll (20s).
HTTPClient *http.Client
}
Config locates a service and signs for it.
type Message ¶
type Message struct {
ID string
Body string
ReceiptHandle string
// ReceiveCount is how many times SQS has delivered it, which says when a message keeps failing.
ReceiveCount int
}
Message is one received message. It stays on the queue, invisible, until it is deleted or its visibility timeout runs out.
type SNS ¶
type SNS struct {
// contains filtered or unexported fields
}
SNS publishes to one topic.
type SQS ¶
type SQS struct {
// contains filtered or unexported fields
}
SQS sends to and receives from one queue.
func (*SQS) FIFO ¶
FIFO reports whether the queue is a FIFO queue, which needs a group id on every send.