launchdarkly/ld-relay — reverse-engineered prompt
Reverse engineered prompt
Build me a self hosted LaunchDarkly Relay Proxy in Go. I want it to connect once to LaunchDarkly’s streaming API, then let lots of my apps and SDKs connect to the relay locally instead of every app opening its own outbound stream.
It should support multiple projects and environments from a config file or environment variables. Include proxy mode where SDKs talk to it like LaunchDarkly, and daemon mode where it writes flag data into a persistent store like Redis, DynamoDB, or Consul. It should also be able to accept SDK analytics events and forward them to LaunchDarkly.
Please add clear logging, health checks, useful errors for bad config, and metrics export for tools like Prometheus or Datadog. Make it runnable as a command line service with options for config path, env config, and version. Also include Docker support, simple example configs, tests for the main flows, and docs that explain how to run it locally and in production. Look up current LaunchDarkly relay docs online if you need to.
Want more depth? Deep Reverse