-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Cole Bailey <[email protected]>
- Loading branch information
1 parent
f5e89c0
commit 45e3739
Showing
3 changed files
with
50 additions
and
51 deletions.
There are no files selected for viewing
51 changes: 1 addition & 50 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 |
---|---|---|
@@ -1,54 +1,5 @@ | ||
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 initialize(self, evaluation_context: EvaluationContext) -> None: | ||
return | ||
|
||
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]]: ... | ||
|
||
from .protocol import AbstractResolver | ||
|
||
__all__ = ["AbstractResolver", "GrpcResolver", "InProcessResolver"] |
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
48 changes: 48 additions & 0 deletions
48
...s/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/protocol.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,48 @@ | ||
import typing | ||
|
||
from typing_extensions import Protocol | ||
|
||
from openfeature.evaluation_context import EvaluationContext | ||
from openfeature.flag_evaluation import FlagResolutionDetails | ||
|
||
|
||
class AbstractResolver(Protocol): | ||
def initialize(self, evaluation_context: EvaluationContext) -> None: | ||
return | ||
|
||
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]]: ... |