Class: Shoryuken::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/shoryuken/client.rb

Constant Summary collapse

@@queues =
{}
@@topics =
{}

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.account_idObject

Returns the value of attribute account_id


27
28
29
# File 'lib/shoryuken/client.rb', line 27

def 
  @account_id
end

.snsObject


11
12
13
# File 'lib/shoryuken/client.rb', line 11

def sns
  @sns ||= Aws::SNS::Client.new(aws_client_options(:sns_endpoint))
end

.sns_arnObject


15
16
17
# File 'lib/shoryuken/client.rb', line 15

def sns_arn
  @sns_arn ||= SnsArn
end

.sqsObject


19
20
21
# File 'lib/shoryuken/client.rb', line 19

def sqs
  @sqs ||= Aws::SQS::Client.new(aws_client_options(:sqs_endpoint))
end

.sqs_resource=(value) ⇒ Object (writeonly)

Sets the attribute sqs_resource

Parameters:

  • value

    the value to set the attribute sqs_resource to.


28
29
30
# File 'lib/shoryuken/client.rb', line 28

def sqs_resource=(value)
  @sqs_resource = value
end

Class Method Details

.queues(name) ⇒ Object


7
8
9
# File 'lib/shoryuken/client.rb', line 7

def queues(name)
  @@queues[name.to_s] ||= Shoryuken::Queue.new(sqs, name)
end

.topics(name) ⇒ Object


23
24
25
# File 'lib/shoryuken/client.rb', line 23

def topics(name)
  @@topics[name.to_s] ||= Topic.new(name, sns)
end