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

feat(flagd): Support supplying a custom sync provider for in-process flagd #598

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cupofcat
Copy link

@cupofcat cupofcat commented Dec 2, 2024

This PR

  • When the user is using in-process flagd, allows them to supply a sync.ISync implementation of their own that can fetch the flag config in any way they like.

Notes

This PR provides the capability in Go that was recently added in Java.

@beeme1mr
Copy link
Member

beeme1mr commented Dec 2, 2024

Hey @cupofcat, thanks for the PR. Could you please add a short section to the README that explains how to configure a custom sync provider? It can be similar to what was done in Java.

@beeme1mr beeme1mr requested a review from warber December 2, 2024 16:12
@@ -52,6 +54,8 @@ type providerConfiguration struct {
Selector string
SocketPath string
TLSEnabled bool
CustomSyncProvider sync.ISync
CustomSyncProviderUri string
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need the URI as well?
Is it only to be returned from the makeSyncProvider?

It worries me a little bit because the URI here is not used at all. Caller needs to make sure they return a valid URI for the provider. At the same time most (all?) providers have the uri inside. Maybe it's possible to extend the interface to include a GetURI method?

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

Successfully merging this pull request may close these issues.

6 participants