-
Notifications
You must be signed in to change notification settings - Fork 108
[FEATURE] flagd bulk evaluation #234
Copy link
Copy link
Closed
Labels
Needs TriageThis issue needs to be investigated by a maintainerThis issue needs to be investigated by a maintainerenhancementNew feature or requestNew feature or request
Description
Requirements
In order to support synchronous evaluation (something particularly important for client use cases), we need a bulk evaluation endpoint in flagd. The endpoint would accept a context and evaluate all configured flags with that context. The returned result should be a map of flagKey: resolutionDetails.
- update schema ([FEATURE] bulk evaluation flagd-schemas#63)
- implement function
- add tests
- add documentation
Example curl:
curl -X POST "localhost:8013/schema.v1.Service/ResolveAll" -d '{"context":{"email": "[email protected]"}}' -H "Content-Type: application/json"
{
"flag1":{
"value":"#0000FF",
"reason":"TARGETING_MATCH",
"variant":"blue"
},
"flag2":{
"value":false,
"reason":"STATIC",
"variant":"on"
}
}
Things to consider:
- possible enhancements in the future to allow an array of flag keys to evaluate, instead of all
- should we include additional metadata such as flag type to aid in parsing?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs TriageThis issue needs to be investigated by a maintainerThis issue needs to be investigated by a maintainerenhancementNew feature or requestNew feature or request