Skip to content

Commit

Permalink
feat: resolve-all functionality (#62)
Browse files Browse the repository at this point in the history
Closes: #63

Signed-off-by: Todd Baert <toddbaert@gmail.com>
  • Loading branch information
toddbaert authored Dec 20, 2022
1 parent aa5714e commit 9ca9ee3
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion protobuf/schema/v1/schema.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,38 @@ option csharp_namespace = "OpenFeature.Flagd.Grpc";
option php_namespace = "OpenFeature\\Providers\\Flagd\\Schema\\Grpc";

import "google/protobuf/struct.proto";
import "google/protobuf/empty.proto";

// Request body for bulk flag evaluation, used by the ResolveAll rpc.
message ResolveAllRequest {

// Object structure describing the EvaluationContext used in the flag evaluation, see https://docs.openfeature.dev/docs/reference/concepts/evaluation-context
google.protobuf.Struct context = 1;
}

// Response body for bulk flag evaluation, used by the ResolveAll rpc.
message ResolveAllResponse {

// Object structure describing the evaluated flags for the provided context.
map<string, AnyFlag> flags = 1;
}

// A variant type flag response.
message AnyFlag {

// The reason for the given return value, see https://docs.openfeature.dev/docs/specification/types#resolution-details
string reason = 1;

// The variant name of the returned flag value.
string variant = 2;

// The response value of the boolean flag evaluation, will be unset in the case of error.
oneof value {
bool bool_value = 3;
string string_value = 4;
double double_value = 5;
google.protobuf.Struct object_value = 6;
}
}

// Request body for boolean flag evaluation, used by the ResolveBoolean rpc.
message ResolveBooleanRequest {
Expand Down Expand Up @@ -145,6 +176,7 @@ message EventStreamRequest {}

// Service defines the exposed rpcs of flagd
service Service {
rpc ResolveAll(ResolveAllRequest) returns (ResolveAllResponse) {}
rpc ResolveBoolean(ResolveBooleanRequest) returns (ResolveBooleanResponse) {}
rpc ResolveString(ResolveStringRequest) returns (ResolveStringResponse) {}
rpc ResolveFloat(ResolveFloatRequest) returns (ResolveFloatResponse) {}
Expand Down

0 comments on commit 9ca9ee3

Please sign in to comment.