Module: LogStash::Outputs::ElasticSearch::DataStreamSupport::Validator

Defined in:
lib/logstash/outputs/elasticsearch/data_stream_support.rb

Instance Method Summary collapse

Instance Method Details

#validate_value(value, validator) ⇒ Array(true,Object), Array(false,String)

Parameters:

  • value (Array<Object>)
  • validator (nil, Array, Symbol)

Returns:

  • (Array(true,Object))

    : if validation is a success, a tuple containing ‘true` and the coerced value

  • (Array(false,String))

    : if validation is a failure, a tuple containing ‘false` and the failure reason.



238
239
240
241
242
243
244
# File 'lib/logstash/outputs/elasticsearch/data_stream_support.rb', line 238

def validate_value(value, validator)
  case validator
  when :dataset_identifier   then validate_dataset_identifier(value)
  when :namespace_identifier then validate_namespace_identifier(value)
  else super
  end
end