Class: StreamData::Config
- Inherits:
-
Object
- Object
- StreamData::Config
- Defined in:
- lib/stream_data.rb
Constant Summary collapse
- ALLOWED_SERVICE_TYPES =
["azure","aws"]
Instance Method Summary collapse
-
#initialize(config, opts = {}) ⇒ Config
constructor
A new instance of Config.
- #send_stream(raw_data) ⇒ Object
Constructor Details
#initialize(config, opts = {}) ⇒ Config
Returns a new instance of Config.
7 8 9 |
# File 'lib/stream_data.rb', line 7 def initialize(config,opts={}) initialize_config(config,opts) end |
Instance Method Details
#send_stream(raw_data) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/stream_data.rb', line 11 def send_stream(raw_data) return "String data can only be sent via this service" unless raw_data.is_a? String case @config[:type_of_service] when "aws" aws_firehose = StreamData::AwsStreamService.new(@config,@opts) aws_firehose.send_stream(raw_data) else return "No data sent" end end |