Class: LogStash::Outputs::Application_insights::Validate_storage
- Defined in:
- lib/logstash/outputs/application_insights/validate_storage.rb
Constant Summary
Constants inherited from Blob
Instance Attribute Summary
Attributes inherited from Blob
#blob_name, #container_name, #instrumentation_key, #io_queue, #last_io_exception, #oldest_event_time, #storage_account_name, #table_id, #uploaded_bytesize, #uploaded_events_count
Instance Method Summary collapse
-
#initialize ⇒ Validate_storage
constructor
A new instance of Validate_storage.
- #validate ⇒ Object
Methods inherited from Blob
#<<, #blob_empty?, #blob_full?, #clear_state, #close, close, #commit, #create_container_exist_recovery, #create_exist_recovery, #create_table_exist_recovery, #notify, #notify_retry_later, #queue_empty?, #queue_size, #state_table_delete, #state_table_insert, #state_table_query, #state_table_update, #state_to_table_entity, #state_to_tuple, stopped?, #table_entity_to_tuple, #test_notification, #test_storage, #tuple_to_state, #update_commited_or_uncommited_list, #upload, #upload_retry_later
Constructor Details
#initialize ⇒ Validate_storage
Returns a new instance of Validate_storage.
27 28 29 30 31 |
# File 'lib/logstash/outputs/application_insights/validate_storage.rb', line 27 def initialize # super first parameter must be nil. blob first parameter is channel, otherwise it will pass storage_account_name as channel super( nil ) @storage_account_name_key = @configuration[:storage_account_name_key] end |
Instance Method Details
#validate ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/logstash/outputs/application_insights/validate_storage.rb', line 33 def validate result = {} @storage_account_name_key.each do |storage_account_name, storage_account_keys| result[storage_account_name] = {:success => test_storage( storage_account_name ), :error => @last_io_exception } end result end |