Comments (10)
@james-milligan I think we should do this, yep! Go for it.
from go-sdk.
@toddbaert @beeme1mr @skyerus @davejohnston
from go-sdk.
If we flatten the structure into map[string]interface{}
by inserting the rest of EvaluationContext
's fields (currently just TargetingKey
into the map we run into the issue that providers would need to look up the key from the sdk (e.g. targetingKey
vs targeting-key
) which is undesirable.
from go-sdk.
According to the spec, the targeting key is optional.
It's just a named property so we can properly map it to providers that required a unique identifier.
from go-sdk.
I feel like option two would be bring us closer to other SDKs.
from go-sdk.
I feel like option two would be bring us closer to other SDKs.
Agreed. I think this is also how flagd
understands the evaluation context (as a flat object, please confirm @james-milligan ), which will bring those interfaces closer together. As mentioned before, I'd like flagd to eventually use the provider interface from the golang SDK, if reasonable.
from go-sdk.
That is correct, flagd expects a map[string]interface{}
I also agree that option 2 will be the cleanest approach for this
from go-sdk.
@james-milligan are there any next steps here or can we close the issue?
from go-sdk.
as of yet the changes haven't been implemented, im happy to assign this to myself and implement the changes, provided that is ok with @toddbaert
(if we still feel like this is a worthwhile change)
from go-sdk.
I've opened up a draft PR for this. I've opted to not introduce another type to wrap the map[string]interface{}
to reduce confusion, but as the flattened context is returned by a function this would be very simple to implement.
from go-sdk.
Related Issues (20)
- Update README to be consistent with other SDKs
- Changes to support spec `v0.6.0` compliance HOT 4
- implement named client support: open-feature/spec@4cf8229 HOT 1
- implement initialization/shutdown: open-feature/spec@a4ffec3
- Implement event support HOT 1
- Conform to spec `v0.7.0` HOT 6
- event handlers should run immediately if the associated provider is in the state associated with that handler already
- [FEATURE] Follow official Go guidance on how to organize a module? HOT 9
- [FEATURE] Follow up for 227 HOT 2
- [BUG] Panic when following getting started tutorial HOT 2
- [FEATURE] Blocking provider mutator HOT 1
- [FEATURE] Expose domain specific provider metadata getter HOT 1
- [FEATURE] Upgrade to Go version 1.20
- [FEATURE] Implement transaction context HOT 5
- [FEATURE] Implement domain scoping HOT 2
- [FEATURE] Make provider interface "stateless", SDK maintains provider state
- Should retrieving a value really provide an error? HOT 5
- [FEATURE] Move to log/slog logging HOT 2
- [BUG] Awkward usage when trying to evaluate a boolean flag in a complex conditional HOT 8
- [FEATURE] New test-oriented client HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-sdk.