Class: InfluxDB2::PointSettings
- Inherits:
-
Object
- Object
- InfluxDB2::PointSettings
- Defined in:
- lib/influxdb2/client/write_api.rb
Overview
Settings to store default tags.
Instance Attribute Summary collapse
-
#default_tags ⇒ Object
readonly
Returns the value of attribute default_tags.
Class Method Summary collapse
Instance Method Summary collapse
- #add_default_tag(key, expression) ⇒ Object
-
#initialize(default_tags: nil) ⇒ PointSettings
constructor
A new instance of PointSettings.
Constructor Details
#initialize(default_tags: nil) ⇒ PointSettings
Returns a new instance of PointSettings.
87 88 89 |
# File 'lib/influxdb2/client/write_api.rb', line 87 def initialize(default_tags: nil) @default_tags = || {} end |
Instance Attribute Details
#default_tags ⇒ Object (readonly)
Returns the value of attribute default_tags.
90 91 92 |
# File 'lib/influxdb2/client/write_api.rb', line 90 def @default_tags end |
Class Method Details
.get_value(value) ⇒ Object
96 97 98 99 100 101 102 |
# File 'lib/influxdb2/client/write_api.rb', line 96 def self.get_value(value) if value.start_with?('${env.') ENV[value[6..-2]] else value end end |
Instance Method Details
#add_default_tag(key, expression) ⇒ Object
92 93 94 |
# File 'lib/influxdb2/client/write_api.rb', line 92 def add_default_tag(key, expression) @default_tags[key] = expression end |