Class: Conrad::Emitters::Sqs
- Inherits:
-
AmazonBase
- Object
- AmazonBase
- Conrad::Emitters::Sqs
- Defined in:
- lib/conrad/emitters/sqs.rb
Overview
Basic emitter for sending events to AWS’s sqs. If all access information is given, the given credentials will be used. Otherwise, the emitter will attempt to use values configured in the running environment according to the AWS SDK documentation (such as from ~/.aws/credentials).
Instance Attribute Summary collapse
-
#queue_url ⇒ String
The configured SQS queue URL.
Attributes inherited from AmazonBase
#access_key_id, #client, #region, #secret_access_key
Class Method Summary collapse
Instance Method Summary collapse
-
#call(event) ⇒ Object
Sends an event up to SQS.
Methods inherited from AmazonBase
Constructor Details
This class inherits a constructor from Conrad::Emitters::AmazonBase
Instance Attribute Details
#queue_url ⇒ String
Returns the configured SQS queue URL.
13 14 15 |
# File 'lib/conrad/emitters/sqs.rb', line 13 def queue_url @queue_url end |
Class Method Details
.client_class ⇒ Object
23 24 25 |
# File 'lib/conrad/emitters/sqs.rb', line 23 def client_class Aws::SQS::Client end |
Instance Method Details
#call(event) ⇒ Object
Sends an event up to SQS
18 19 20 |
# File 'lib/conrad/emitters/sqs.rb', line 18 def call(event) client.(queue_url: queue_url, message_body: event) end |