Sign inSign up

thomaspoignant/go-feature-flag-relay-proxy

By thomaspoignant

•Updated about 7 hours ago

A simple and complete feature flag solution

Image
Languages & frameworks
Integration & delivery
Developer tools
1

1M+

thomaspoignant/go-feature-flag-relay-proxy repository overview

⁠GO Feature Flag Relay Proxy

🚨 Attention: The image thomaspoignant/go-feature-flag-relay-proxy is deprecated. The official image is now gofeatureflag/go-feature-flag⁠. Existing tags will keep working for now, but we recommend migrating as soon as possible. See the installation documentation⁠.

go-feature-flag logo

Docker Image Version Docker Image Size Docker Hub downloads License Join us on slack


⁠How to migrate

Migrating only requires changing the image name, the configuration file location (/goff/goff-proxy.yaml) and the default port (1031) are the same.

- thomaspoignant/go-feature-flag-relay-proxy:latest
+ gofeatureflag/go-feature-flag:latest

⁠What is GO Feature Flag Relay Proxy?

The GO Feature Flag Relay Proxy retrieve your feature flag configuration file using thomaspoignant/go-feature-flag⁠ SDK and expose APIs to get your flags variations.
It lets a number of servers to connect to a single configuration file.

This can be useful if you want to use the same feature flags configuration file for frontend and backend, this allows to be language agnostic by using standard protocol.

For more information about GO Feature Flag Relay Proxy, please visit github.com/thomaspoignant/go-feature-flag⁠.

⁠Quick reference

⁠How to use this image

The relay proxy requires a configuration file to be used.

By default, we expect to have this configuration file in the /goff directory of the container and the file should be named goff-proxy.yaml.

The default port used for the service is 1031.

docker run \
  -v $(pwd)/goff-proxy.yaml:/goff/goff-proxy.yaml \
  gofeatureflag/go-feature-flag:latest

⁠Test it locally

This is a small example on how to run the relay proxy locally.

# Download an example of a basic configuration file.
curl https://raw.githubusercontent.com/thomaspoignant/go-feature-flag/main/cmd/relayproxy/testdata/dockerhub-example/goff-proxy.yaml -o goff-proxy.yaml

# Launch the container
docker run \
  -p 1031:1031 \
  -v $(pwd)/goff-proxy.yaml:/goff/goff-proxy.yaml \
  gofeatureflag/go-feature-flag:latest
  
# Call the API
curl -X 'POST' \
  'http://localhost:1031/v1/feature/flag-only-for-admin/eval'  -H 'accept: application/json'  -H 'Content-Type: application/json' \
  -d '{ "user": { "key": "[email protected]", "anonymous": true, "custom": { "admin": true, "email": "[email protected]" }}, "defaultValue": "false"}'

⁠License

View license⁠ information for the software contained in this image.

⁠How can I contribute?

This project is open for contribution, see the contributor's guide⁠ for some helpful tips.

Tag summary

Content type

Image

Digest

sha256:930a7e7c9…

Size

37.7 MB

Last updated

about 7 hours ago

docker pull thomaspoignant/go-feature-flag-relay-proxy