Class: Alephant::Publisher::Queue::Options

Inherits:
Object
  • Object
show all
Includes:
Logger
Defined in:
lib/alephant/publisher/queue/options.rb

Constant Summary collapse

QUEUE_OPTS =
[
  :receive_wait_time,
  :sqs_queue_name,
  :visibility_timeout,
  :aws_account_id,
  :sqs_account_region,
  :log_archive_message,
  :log_validator,
  :async_store
].freeze
WRITER_OPTS =
[
  :lookup_table_name,
  :msg_vary_id_path,
  :renderer_id,
  :s3_bucket_id,
  :s3_object_path,
  :sequence_id_path,
  :sequencer_table_name,
  :view_path
].freeze
CACHE_OPTS =
[
  :elasticache_config_endpoint,
  :elasticache_cache_version,
  :revalidate_cache_ttl
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOptions

Returns a new instance of Options.



42
43
44
45
46
# File 'lib/alephant/publisher/queue/options.rb', line 42

def initialize
  @queue  = {}
  @writer = {}
  @cache  = {}
end

Instance Attribute Details

#cacheObject (readonly)

Returns the value of attribute cache.



12
13
14
# File 'lib/alephant/publisher/queue/options.rb', line 12

def cache
  @cache
end

#queueObject (readonly)

Returns the value of attribute queue.



12
13
14
# File 'lib/alephant/publisher/queue/options.rb', line 12

def queue
  @queue
end

#writerObject (readonly)

Returns the value of attribute writer.



12
13
14
# File 'lib/alephant/publisher/queue/options.rb', line 12

def writer
  @writer
end

Instance Method Details

#add_cache(opts) ⇒ Object



56
57
58
# File 'lib/alephant/publisher/queue/options.rb', line 56

def add_cache(opts)
  execute(@cache, CACHE_OPTS, opts)
end

#add_queue(opts) ⇒ Object



48
49
50
# File 'lib/alephant/publisher/queue/options.rb', line 48

def add_queue(opts)
  execute(@queue, QUEUE_OPTS, opts)
end

#add_writer(opts) ⇒ Object



52
53
54
# File 'lib/alephant/publisher/queue/options.rb', line 52

def add_writer(opts)
  execute(@writer, WRITER_OPTS, opts)
end