Skip to content

[FEATURE] flagd bulk evaluation #234

@toddbaert

Description

@toddbaert

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.

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?

Metadata

Metadata

Labels

Needs TriageThis issue needs to be investigated by a maintainerenhancementNew feature or request

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions