Module: Artsy::EventService
- Defined in:
- lib/artsy-eventservice/config.rb,
lib/artsy-eventservice/version.rb,
lib/artsy-eventservice/artsy/event_service.rb,
lib/artsy-eventservice/artsy/event_service/publisher.rb,
lib/artsy-eventservice/artsy/event_service/rabbitmq_connection.rb
Defined Under Namespace
Modules: Config, RabbitMQConnection
Classes: Publisher
Constant Summary
collapse
- VERSION =
'1.0.1'
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
37
38
39
|
# File 'lib/artsy-eventservice/config.rb', line 37
def config
Config
end
|
32
33
34
35
|
# File 'lib/artsy-eventservice/config.rb', line 32
def configure
yield(Config) if block_given?
Config
end
|
.consume(**args) ⇒ Object
10
11
12
|
# File 'lib/artsy-eventservice/artsy/event_service.rb', line 10
def self.consume(**args)
raise 'Not implemented- try Sneakers'
end
|
.event_stream_enabled? ⇒ Boolean
14
15
16
|
# File 'lib/artsy-eventservice/artsy/event_service.rb', line 14
def self.event_stream_enabled?
Artsy::EventService.config.event_stream_enabled
end
|
.post_event(topic:, event:) ⇒ Object
5
6
7
8
|
# File 'lib/artsy-eventservice/artsy/event_service.rb', line 5
def self.post_event(topic:, event:)
return unless event_stream_enabled?
Publisher.publish(topic: topic, event: event)
end
|