feat: feature flag polling for local evaluation (1/4) #54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
When I was looking on how to contribute to the PostHog's roadmap, I've found that one of the top items is implementing Feature Flags in Java for local evaluation. See issue: PostHog/posthog#16419
The
FeatureFlagPoller
is set to fetch for new feature flags every 5 minutes. The poller also provides aforceReload
method in case the consumer wants to have an up-to-date view of the feature flags.I based most of my implementation from https://github.com/PostHog/posthog-go
I wanted to get an understanding on how to interact with PostHog's product, and Feature Flags seems a straightforward entrypoint to the portfolio.
Review order
This is the first of two PRs. I wanted to keep the scope of the change simple to facilitate the review. This PR is mainly POJOs;
FeatureFlagPoller
being the exception.distinct_id
The pull-requests mentioned above should not be reviewed until the dependencies are merged.