-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Updates to
Provider
module in preparation for `InMemoryProvid…
…er` (#99) Signed-off-by: Max VelDink <[email protected]>
- Loading branch information
1 parent
8bfe176
commit 2d89570
Showing
10 changed files
with
71 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module OpenFeature | ||
module SDK | ||
EvaluationDetails = Struct.new(:flag_key, :resolution_details, keyword_init: true) do | ||
extend Forwardable | ||
|
||
def_delegators :resolution_details, :value, :reason, :variant, :error_code, :error_message, :flag_metadata | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
require_relative "provider/error_code" | ||
require_relative "provider/reason" | ||
require_relative "provider/resolution_details" | ||
require_relative "provider/no_op_provider" | ||
|
||
module OpenFeature | ||
module SDK | ||
module Provider | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module OpenFeature | ||
module SDK | ||
module Provider | ||
module ErrorCode | ||
PROVIDER_NOT_READY = "Provider Not Ready" | ||
FLAG_NOT_FOUND = "Flag Not Found" | ||
PARSE_ERROR = "Parse Error" | ||
TYPE_MISMATCH = "Type Mismatch" | ||
TARGETING_KEY_MISSING = "Targeting Key Missing" | ||
INVALID_CONTEXT = "Invalid Context" | ||
GENERAL = "General" | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module OpenFeature | ||
module SDK | ||
module Provider | ||
module Reason | ||
STATIC = "Static" | ||
DEFAULT = "Default" | ||
TARGETING_MATCH = "Targeting Match" | ||
SPLIT = "Split" | ||
CACHED = "Cached" | ||
DISABLED = "Disabled" | ||
UNKNOWN = "Unknown" | ||
STALE = "Stale" | ||
ERROR = "Error" | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module OpenFeature | ||
module SDK | ||
module Provider | ||
ResolutionDetails = Struct.new(:value, :reason, :variant, :error_code, :error_message, :flag_metadata, keyword_init: true) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters