Class: Circuitry::Publisher
- Inherits:
-
Object
- Object
- Circuitry::Publisher
- Includes:
- Concerns::Async, Services::SNS
- Defined in:
- lib/circuitry/testing.rb,
lib/circuitry/publisher.rb
Constant Summary collapse
- DEFAULT_OPTIONS =
{ async: false, timeout: 15 }.freeze
- CONNECTION_ERRORS =
[ ::Seahorse::Client::NetworkingError, ::Aws::SNS::Errors::InternalFailure ].freeze
Instance Attribute Summary collapse
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
Attributes included from Concerns::Async
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Publisher
constructor
A new instance of Publisher.
- #publish(topic_name, object) ⇒ Object
Methods included from Services::SNS
Methods included from Concerns::Async
#async?, included, #process_asynchronously
Constructor Details
#initialize(options = {}) ⇒ Publisher
Returns a new instance of Publisher.
25 26 27 28 29 30 |
# File 'lib/circuitry/publisher.rb', line 25 def initialize( = {}) = DEFAULT_OPTIONS.merge() self.async = [:async] self.timeout = [:timeout] end |
Instance Attribute Details
#timeout ⇒ Object
Returns the value of attribute timeout.
23 24 25 |
# File 'lib/circuitry/publisher.rb', line 23 def timeout @timeout end |
Class Method Details
.default_async_strategy ⇒ Object
46 47 48 |
# File 'lib/circuitry/publisher.rb', line 46 def self.default_async_strategy Circuitry.publisher_config.async_strategy end |
Instance Method Details
#publish(topic_name, object) ⇒ Object
5 6 7 |
# File 'lib/circuitry/testing.rb', line 5 def publish(_topic_name, _object) # noop end |