From 997cf8d6c1292658d45833f158ae417092214d78 Mon Sep 17 00:00:00 2001 From: Thomas Poignant Date: Fri, 6 Jan 2023 17:45:13 +0100 Subject: [PATCH] Fix readme merge issue (#443) --- README.md | 83 ++++--------------------------------------------------- 1 file changed, 6 insertions(+), 77 deletions(-) diff --git a/README.md b/README.md index d44b00ee782..e6fc7bc5bdd 100644 --- a/README.md +++ b/README.md @@ -238,12 +238,7 @@ It is a service you can host that provides an API to evaluate your flags, you ca Since we believe in standardization we are also implementing [OpenFeature](https://github.com/open-feature) providers to interact with this API in the language of your choice. _(OpenFeature is still at an early stage, so not all languages are supported and expect some changes in the future)_ -<<<<<<< HEAD -======= -In all the examples above, they demonstrate using `go-feature-flag` in its singleton style approach. -You can also create many `go-feature-flag` clients to use in your application. -[See the documentation for more details.](https://docs.gofeatureflag.org/docs/configuration#multiple-configuration-flag-files) ->>>>>>> origin/main +For now, we have providers for `python`, `java`, `typescript`, `javascript`, `GO` and `.NET`. ## Where do I store my flags file? @@ -256,18 +251,7 @@ Available retrievers are: - **Google Cloud Storage** - **Kubernetes ConfigMaps** -<<<<<<< HEAD -_[See full list and more information.](https://gofeatureflag.org/docs/configure_flag/store_your_flags)_ -======= -- [From GitHub](https://docs.gofeatureflag.org/docs/flag_file/github) -- [From an HTTP endpoint](https://docs.gofeatureflag.org/docs/flag_file/http) -- [From a S3 Bucket](https://docs.gofeatureflag.org/docs/flag_file/s3) -- [From a file](https://docs.gofeatureflag.org/docs/flag_file/file) -- [From Google Cloud Storage](https://docs.gofeatureflag.org/docs/flag_file/google_cloud_storage) -- [From Kubernetes ConfigMaps](https://docs.gofeatureflag.org/docs/flag_file/kubernetes_configmaps) - -You can also [create your own retriever](https://docs.gofeatureflag.org/docs/flag_file/custom). ->>>>>>> origin/main +_[See the full list and more information.](https://gofeatureflag.org/docs/configure_flag/store_your_flags)_ ## Flags file format **GO Feature Flag** core feature is to centralize all your feature flags in a single file and to avoid hosting and maintaining a backend server to manage them. @@ -460,15 +444,11 @@ All the other attributes are optional. Since it is useful to make complex queries on your flag, you can add as many information fields you want to your user. It will be used when testing the targeting rules. -<<<<<<< HEAD -## Variations -======= You can also distinguish logged-in users from anonymous users in the SDK ([check documentation about anonymous users](https://docs.gofeatureflag.org/docs/users#anonymous-users)). ->>>>>>> origin/main +## Variations The Variation methods determine whether a flag is enabled or not for a specific user. -<<<<<<< HEAD GO Feature Flag can manage more than `boolean`, the value of your flag can be any of these types: - `bool` - `int` @@ -476,7 +456,8 @@ GO Feature Flag can manage more than `boolean`, the value of your flag can be an - `string` - `json array` - `json object` -======= + +### Example ```go linenums="1" result, _ := ffclient.BoolVariation("your.feature.key", user, false) @@ -500,7 +481,6 @@ information you need. The `MarshalJSON()` function will return a JSON Object, that can be directly used by your front-end application. [More details in the documentation.](https://docs.gofeatureflag.org/docs/users#get-all-flags-for-a-specific-user) ->>>>>>> origin/main ## Rollout A critical part of every new feature release is orchestrating the actual launch schedule between the Product, Engineering, and Marketing teams. @@ -511,17 +491,10 @@ But it does not have to, having a complex **rollout** strategy allows you to hav ### Complex rollout strategy available -<<<<<<< HEAD - [Canary releases](https://gofeatureflag.org/docs/configure_flag/rollout/canary) - impact randomly a subset of your users. - [Progressive rollout](https://gofeatureflag.org/docs/configure_flag/rollout/progressive) - increase the percentage of your flag over time. - [Scheduled rollout](https://gofeatureflag.org/docs/configure_flag/rollout/scheduled/) - update your flag over time. - [Experimentation rollout](https://gofeatureflag.org/docs/configure_flag/rollout/experimentation) - serve your feature only for a determined time *(perfect for A/B testing)*. -======= -- [Canary releases](https://docs.gofeatureflag.org/docs/rollout/canary) - impact randomly a subset of your users. -- [Progressive rollout](https://docs.gofeatureflag.org/docs/rollout/progressive) - increase the percentage of your flag over time. -- [Scheduled rollout](https://docs.gofeatureflag.org/docs/rollout/scheduled) - update your flag over time. -- [Experimentation rollout](https://docs.gofeatureflag.org/docs/rollout/experimentation) - serve your feature only for a determined time *(perfect for A/B testing)*. ->>>>>>> origin/main ## Notifiers If you want to be informed when a flag has changed, you can configure a [**notifier**](https://pkg.go.dev/github.com/thomaspoignant/go-feature-flag#NotifierConfig). @@ -531,37 +504,23 @@ A notifier will send one notification to the targeted system to inform them that ℹ️ **GO Feature Flag** can handle more than one notifier at a time. Available notifiers are: -<<<<<<< HEAD - **Slack** - **Webhook** -======= - -- [Slack](https://docs.gofeatureflag.org/docs/notifier/slack) - Get a slack message with the changes. -- [Webhook](https://docs.gofeatureflag.org/docs/notifier/webhook) - Call an API with the changes. ->>>>>>> origin/main ## Export data **GO Feature Flag** allows you to export data about the usage of your flags. It collects all the variations events and can save these events in several locations: -<<<<<<< HEAD - **Local file** *- create local files with the variation usages.* - **Log** *- use your logger to write the variation usages.* - **AWS S3** *- export your variation usages to S3.* - **Google Cloud Storage** *- export your variation usages to Google Cloud Storage.* - **Webhook** *- export your variation usages by calling a webhook.* -======= -- [File](https://docs.gofeatureflag.org/docs/data_collection/file) *- create local files with the variation usages.* -- [Log](https://docs.gofeatureflag.org/docs/data_collection/log) *- use your logger to write the variation usages.* -- [S3](https://docs.gofeatureflag.org/docs/data_collection/s3) *- export your variation usages to S3.* -- [Google Cloud Storage](https://docs.gofeatureflag.org/docs/data_collection/google_cloud_storage) *- export your variation usages to Google Cloud Storage.* -- [Webhook](https://docs.gofeatureflag.org/docs/data_collection/webhook) *- export your variation usages by calling a webhook.* ->>>>>>> origin/main Currently, we are supporting only feature events. It represents individual flag evaluations and is considered "full fidelity" events. -**An example feature event bellow:** +**An example feature event below:** ```json { "kind": "feature", @@ -574,38 +533,8 @@ It represents individual flag evaluations and is considered "full fidelity" even "default": false } ``` -<<<<<<< HEAD The format of the data is [described in the documentation](https://gofeatureflag.org/docs/). Events are collected and sent in bulk to avoid spamming your exporter. -======= -The format of the data is [described in the documentation](https://docs.gofeatureflag.org/docs/data_collection#data-format). - -Events are collected and sent in bulk to avoid spamming your exporter *(_see details on [how to](#how-to-configure-data-export)_ configure data export](#how-to-configure-data-export)*). - -### How to configure data export? -In your `ffclient.Config` add the `DataExporter` field and configure your export location. - -To avoid spamming your location every time you have a variation called, `go-feature-flag` is storing in memory all the events and send them in bulk to the exporter. -You can decide the threshold on when to send the data with the properties `FlushInterval` and `MaxEventInMemory`. The first threshold hit will export the data. - -If there are some flags you don't want to export, you can use `trackEvents` fields on these specific flags to disable the data export *(see [flag file format](https://docs.gofeatureflag.org/docs/flag_format))*. - -### Example -```go linenums="1" -ffclient.Config{ - // ... - DataExporter: ffclient.DataExporter{ - FlushInterval: 10 * time.Second, - MaxEventInMemory: 1000, - Exporter: &fileexporter.Exporter{ - OutputDir: "/output-data/", - }, - }, - // ... -} -``` -The full configuration is [described in the documentation](https://docs.gofeatureflag.org/docs/data_collection#how-to-configure-data-export). ->>>>>>> origin/main # How can I contribute? This project is open for contribution, see the [contributor's guide](CONTRIBUTING.md) for some helpful tips.