open-feature / go-sdk

Go SDK for OpenFeature
https://openfeature.dev
Apache License 2.0
126 stars 30 forks source link

[FEATURE] Blocking provider mutator #240

Closed toddbaert closed 7 months ago

toddbaert commented 9 months ago

Requirements

As is recommended by the spec, we should add a blocking version of setProvider. This would wait for the provider to be initialized before it returns. It should be named in such a way that its blocking behavior is obvious, and should be documented appropriately. The README should be update to include it (close to the start) and highlight how it behaves differently from setProvider.

See a PR for a similar feature in Java.

Please be sure to add tests!

Relates to: https://github.com/open-feature/go-sdk/issues/238

Kavindu-Dodan commented 7 months ago

I will take over this as the current open PR #244 is not maintained for almost two weeks.