Module: Viki::Queue

Defined in:
lib/queue_client.rb,
lib/viki/queue/logger.rb,
lib/viki/queue/runner.rb,
lib/viki/queue/message.rb,
lib/viki/queue/service.rb,
lib/viki/queue/version.rb

Defined Under Namespace

Modules: Logger, Message, Runner Classes: Service

Constant Summary collapse

VERSION =
"1.0.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

._serviceObject

Returns the value of attribute _service.



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

def _service
  @_service
end

.client_nameObject

Returns the value of attribute client_name.



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

def client_name
  @client_name
end

.hostObject

Returns the value of attribute host.



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

def host
  @host
end

.passwordObject

Returns the value of attribute password.



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

def password
  @password
end

.portObject

Returns the value of attribute port.



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

def port
  @port
end

.usernameObject

Returns the value of attribute username.



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

def username
  @username
end

Class Method Details

.configure(&block) ⇒ Object



14
15
16
17
18
# File 'lib/queue_client.rb', line 14

def self.configure(&block)
  block.call self
  raise "Viki::Queue.client_name not set" unless client_name
  nil
end

.reconnectObject



24
25
26
27
# File 'lib/queue_client.rb', line 24

def self.reconnect
  Viki::Queue._service.stop
  Viki::Queue._service = Service.new({routing: Viki::Queue._service.routing})
end

.serviceObject



20
21
22
# File 'lib/queue_client.rb', line 20

def self.service
  Viki::Queue._service ||= Service.new
end