Module: InfluxDB::AsyncQueue

Defined in:
lib/influxdb/async_queue.rb,
lib/influxdb/async_queue/queue.rb,
lib/influxdb/async_queue/config.rb,
lib/influxdb/async_queue/server.rb,
lib/influxdb/async_queue/version.rb,
lib/influxdb/async_queue/adapters/redis.rb,
lib/influxdb/async_queue/adapters/test_adapter.rb

Defined Under Namespace

Modules: Adapters Classes: Config, Queue, Server

Constant Summary collapse

VERSION =
"0.1.2"

Class Method Summary collapse

Class Method Details

.configObject



21
22
23
# File 'lib/influxdb/async_queue.rb', line 21

def self.config
  @config ||= ::InfluxDB::AsyncQueue::Config.new
end

.config=(config) ⇒ Object



25
26
27
# File 'lib/influxdb/async_queue.rb', line 25

def self.config=(config)
  @config = config
end

.configure(file = nil) {|config| ... } ⇒ Object

Yields:



16
17
18
19
# File 'lib/influxdb/async_queue.rb', line 16

def self.configure(file = nil)
  load_config(file) if file
  yield config
end

.load_config(path) ⇒ Object



12
13
14
# File 'lib/influxdb/async_queue.rb', line 12

def self.load_config(path)
  @config = ::InfluxDB::AsyncQueue::Config.load_from_file! path
end

.queueObject



29
30
31
# File 'lib/influxdb/async_queue.rb', line 29

def self.queue
  @queue ||= ::InfluxDB::AsyncQueue::Queue.new(config.adapter)
end