File tree Expand file tree Collapse file tree 3 files changed +19
-7
lines changed
providers/openfeature-provider-flagd
src/openfeature/contrib/provider/flagd Expand file tree Collapse file tree 3 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -55,9 +55,14 @@ cov = [
5555]
5656
5757[tool .hatch .build .hooks .protobuf ]
58- dependencies = [" hatch-protobuf" ]
59- paths = [" schemas/protobuf/schema/v1/schema.proto" , " schemas/protobuf/sync/v1/sync_service.proto" ]
60- output_path = " src"
58+ dependencies = [
59+ " hatch-protobuf"
60+ ]
61+ proto_paths = [
62+ " schemas/protobuf/flagd/evaluation/v1" ,
63+ " schemas/protobuf/flagd/sync/v1" ,
64+ ]
65+ output_path = " src/openfeature/contrib/provider/flagd/proto"
6166
6267[tool .hatch .build .targets .sdist ]
6368exclude = [
File renamed without changes.
Original file line number Diff line number Diff line change 33import grpc
44from google .protobuf .json_format import MessageToDict
55from google .protobuf .struct_pb2 import Struct
6- from schemas .protobuf .flagd .evaluation .v1 import ( # type:ignore[import-not-found]
7- evaluation_pb2 ,
8- evaluation_pb2_grpc ,
9- )
106
117from openfeature .evaluation_context import EvaluationContext
128from openfeature .exception import (
2016
2117from ..config import Config
2218from ..flag_type import FlagType
19+ from ..proto import (
20+ evaluation_pb2 ,
21+ evaluation_pb2_grpc ,
22+ )
2323
2424T = typing .TypeVar ("T" )
2525
@@ -86,6 +86,13 @@ def _resolve( # noqa: PLR0915
8686 context = self ._convert_context (evaluation_context )
8787 call_args = {"timeout" : self .config .timeout }
8888 try :
89+ request : typing .Union [
90+ evaluation_pb2 .ResolveBooleanRequest ,
91+ evaluation_pb2 .ResolveIntRequest ,
92+ evaluation_pb2 .ResolveStringRequest ,
93+ evaluation_pb2 .ResolveObjectRequest ,
94+ evaluation_pb2 .ResolveFloatRequest ,
95+ ]
8996 if flag_type == FlagType .BOOLEAN :
9097 request = evaluation_pb2 .ResolveBooleanRequest (
9198 flag_key = flag_key , context = context
You can’t perform that action at this time.
0 commit comments