Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Value for ResolveObjectResponse value type. #21

Open
toddbaert opened this issue Sep 8, 2022 · 1 comment
Open

Use Value for ResolveObjectResponse value type. #21

toddbaert opened this issue Sep 8, 2022 · 1 comment

Comments

@toddbaert
Copy link
Member

toddbaert commented Sep 8, 2022

If the discussion here is implemented, I think we want to change ResolveObjectResponse from:

message ResolveObjectResponse {
    google.protobuf.Struct value = 1;
    string reason = 2;
    string variant = 3;
}

to:

message ResolveObjectResponse {
    google.protobuf.Value value = 1;
    string reason = 2;
    string variant = 3;
}

This allows us to return arrays (as well as other protobuf values) as the top level object in the object resolver.

Is there any objections or challenges to doing this? I've POC'd it in the flagd-java provider. Would it be reasonable in flagd?

@james-milligan @skyerus @beeme1mr

@james-milligan
Copy link
Collaborator

I have had play around with this library:
google.golang.org/protobuf/types/known/structpb
It seems pretty doable, we can cast the Value type into an interface{} and return this directly for the provider.
Within flagd we can just do the inverse

No objections from me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants