Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTopic ¶
NewTopic returns a sns.Topic with fully configured SNSAPI.
Note: SQS has limited support for unicode characters. - See http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/limits-messages.html Because we use SNS and SQS together, we recommend that SNS messages are base64-encoded as a best practice. You may use NewUnencodedTopic if you wish to ignore the encoding step.
Types ¶
type MessageWriter ¶
type MessageWriter struct { msg.MessageWriter // contains filtered or unexported fields }
MessageWriter writes data to an output SNS topic as configured via its topicARN.
func (*MessageWriter) Attributes ¶
func (w *MessageWriter) Attributes() *msg.Attributes
Attributes returns the msg.Attributes associated with the MessageWriter.
func (*MessageWriter) Close ¶
func (w *MessageWriter) Close() error
Close converts the MessageWriter's Body and Attributes to sns.PublishInput in order to publish itself to the MessageWriter's snsClient.
On the first call to Close, the MessageWriter is set to "isClosed" therefore blocking subsequent Close and Write calls.
type Option ¶
Option is the signature that modifies a `Topic` to set some configuration
func WithCustomRetryer ¶
WithCustomRetryer sets a custom `Retryer` to use on the SQS client.
func WithRetries ¶
WithRetries makes the `Server` retry on credential errors until `max` attempts with `delay` seconds between requests. This is needed in scenarios where credentials are automatically generated and the program starts before AWS finishes propagating them