Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchOFF ¶
func BatchOFF()
BatchOFF - drains the batch queue called to shut down the batching engine. Usually called on a termination signal
func BatchON ¶
func BatchON()
BatchON turns on SNS Batching to save the costs. It starts the batching engine by calling batching.New(batching.SNS)
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
type Topic ¶
type Topic struct { //Svc snsiface.SNSAPI Svc awsinterfaces.SNSPublisher TopicARN string // contains filtered or unexported fields }
Topic configures and manages SNSAPI for sns.MessageWriter.