Class: Datadog::Core::FeatureFlags::ResolutionDetails Private
- Inherits:
-
Object
- Object
- Datadog::Core::FeatureFlags::ResolutionDetails
- Defined in:
- lib/datadog/core/feature_flags.rb,
ext/libdatadog_api/feature_flags.c
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Resolution details for a feature flag evaluation Base class is defined in the C extension, with Ruby methods added here
Instance Attribute Summary collapse
-
#value ⇒ Object
private
Get the resolved value, with JSON parsing for object types.
Instance Method Summary collapse
- #allocation_key ⇒ Object
-
#error? ⇒ Boolean
private
Check if the resolution resulted in an error.
- #error_code ⇒ Object
- #error_message ⇒ Object
- #flag_metadata ⇒ Object
- #flag_type ⇒ Object
- #log? ⇒ Boolean
- #raw_value ⇒ Object
- #reason ⇒ Object
- #variant ⇒ Object
Instance Attribute Details
#value ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Get the resolved value, with JSON parsing for object types
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/datadog/core/feature_flags.rb', line 30 def value return @value if defined?(@value) # NOTE: Raw value method call doesn't support memoization right now value = raw_value # NOTE: Lazy parsing of the JSON is a temporary solution and will be # moved into C extension @value = json?(value) ? JSON.parse(value) : value rescue JSON::ParserError => e raise Error, "Failed to parse JSON value: #{e.class}: #{e}" end |
Instance Method Details
#allocation_key ⇒ Object
23 |
# File 'ext/libdatadog_api/feature_flags.c', line 23 static VALUE resolution_details_get_allocation_key(VALUE self); |
#error? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Check if the resolution resulted in an error
46 47 48 |
# File 'lib/datadog/core/feature_flags.rb', line 46 def error? reason == 'ERROR' end |
#error_code ⇒ Object
25 |
# File 'ext/libdatadog_api/feature_flags.c', line 25 static VALUE resolution_details_get_error_code(VALUE self); |
#error_message ⇒ Object
26 |
# File 'ext/libdatadog_api/feature_flags.c', line 26 static VALUE (VALUE self); |
#flag_metadata ⇒ Object
28 |
# File 'ext/libdatadog_api/feature_flags.c', line 28 static VALUE (VALUE self); |
#flag_type ⇒ Object
21 |
# File 'ext/libdatadog_api/feature_flags.c', line 21 static VALUE resolution_details_get_flag_type(VALUE self); |
#log? ⇒ Boolean
27 |
# File 'ext/libdatadog_api/feature_flags.c', line 27 static VALUE resolution_details_get_do_log(VALUE self); |
#raw_value ⇒ Object
20 |
# File 'ext/libdatadog_api/feature_flags.c', line 20 static VALUE resolution_details_get_raw_value(VALUE self); |
#reason ⇒ Object
24 |
# File 'ext/libdatadog_api/feature_flags.c', line 24 static VALUE resolution_details_get_reason(VALUE self); |
#variant ⇒ Object
22 |
# File 'ext/libdatadog_api/feature_flags.c', line 22 static VALUE resolution_details_get_variant(VALUE self); |