Class: Eventboss::Publisher

Inherits:
Object
  • Object
show all
Defined in:
lib/eventboss/publisher.rb

Instance Method Summary collapse

Constructor Details

#initialize(event_name, sns_client, configuration, opts = {}) ⇒ Publisher

Returns a new instance of Publisher.



5
6
7
8
9
10
# File 'lib/eventboss/publisher.rb', line 5

def initialize(event_name, sns_client, configuration, opts = {})
  @event_name = event_name
  @sns_client = sns_client
  @configuration = configuration
  @source = configuration.eventboss_app_name unless opts[:generic]
end

Instance Method Details

#publish(payload) ⇒ Object



12
13
14
15
16
# File 'lib/eventboss/publisher.rb', line 12

def publish(payload)
  with_sentry_span do
    sns_client.publish(**build_sns_params(payload))
  end
end