-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: in-process offline flagd resolver (#74)
Signed-off-by: Cole Bailey <cole.bailey@deliveryhero.com> Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
- Loading branch information
1 parent
3e5f850
commit 8cea506
Showing
40 changed files
with
1,437 additions
and
95 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[submodule "schemas"] | ||
path = providers/openfeature-provider-flagd/schemas | ||
url = https://github.com/open-feature/schemas | ||
[submodule "providers/openfeature-provider-flagd/test-harness"] | ||
path = providers/openfeature-provider-flagd/test-harness | ||
url = git@github.com:open-feature/flagd-testbed.git |
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
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
51 changes: 51 additions & 0 deletions
51
...s/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/__init__.py
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,51 @@ | ||
import typing | ||
|
||
from typing_extensions import Protocol | ||
|
||
from openfeature.evaluation_context import EvaluationContext | ||
from openfeature.flag_evaluation import FlagResolutionDetails | ||
|
||
from .grpc import GrpcResolver | ||
from .in_process import InProcessResolver | ||
|
||
|
||
class AbstractResolver(Protocol): | ||
def shutdown(self) -> None: ... | ||
|
||
def resolve_boolean_details( | ||
self, | ||
key: str, | ||
default_value: bool, | ||
evaluation_context: typing.Optional[EvaluationContext] = None, | ||
) -> FlagResolutionDetails[bool]: ... | ||
|
||
def resolve_string_details( | ||
self, | ||
key: str, | ||
default_value: str, | ||
evaluation_context: typing.Optional[EvaluationContext] = None, | ||
) -> FlagResolutionDetails[str]: ... | ||
|
||
def resolve_float_details( | ||
self, | ||
key: str, | ||
default_value: float, | ||
evaluation_context: typing.Optional[EvaluationContext] = None, | ||
) -> FlagResolutionDetails[float]: ... | ||
|
||
def resolve_integer_details( | ||
self, | ||
key: str, | ||
default_value: int, | ||
evaluation_context: typing.Optional[EvaluationContext] = None, | ||
) -> FlagResolutionDetails[int]: ... | ||
|
||
def resolve_object_details( | ||
self, | ||
key: str, | ||
default_value: typing.Union[dict, list], | ||
evaluation_context: typing.Optional[EvaluationContext] = None, | ||
) -> FlagResolutionDetails[typing.Union[dict, list]]: ... | ||
|
||
|
||
__all__ = ["AbstractResolver", "GrpcResolver", "InProcessResolver"] |
Oops, something went wrong.