relayproxy

command
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Semaphore relay proxy

The relay proxy reads your flag sets from a control plane store (an S3 bucket or a directory), where a publisher writes a manifest and the objects it lists, and exposes HTTP APIs to evaluate your flags. It speaks OFREP (OpenFeature Remote Evaluation Protocol), so applications can use the standard OpenFeature SDKs.

When should I use the relay proxy?

  • You want to access your flags through an API instead of the Go module.
  • Your application is not written in Go.
  • You want to centralize the access to your flag configuration.

Quick start

make build-relayproxy        # from the repository root; binary: out/bin/semaphore
./out/bin/semaphore --config=/path/to/bootstrap.yaml

The bootstrap file is version 2 (a version 1 file is refused). Its path is --config or SEMAPHORE_CONFIG. An example with a file store is in testdata/dockerhub-example. SIGHUP reloads the file, SIGTERM and SIGINT stop the relay in order.

Documentation:

Container image

make build-relayproxy-docker builds a local image from source. Released images are published as ghcr.io/blackbirdworks/semaphore (after the first release, see Releasing).

Documentation

Overview

Package main is the entry point of the relay proxy server.

Directories

Path Synopsis
api
Package api serves the relay proxy HTTP API, its OpenAPI document and its server lifecycle.
Package api serves the relay proxy HTTP API, its OpenAPI document and its server lifecycle.
middleware
Package middleware holds the HTTP middleware of the relay proxy, as plain http.Handler wrappers.
Package middleware holds the HTTP middleware of the relay proxy, as plain http.Handler wrappers.
opentelemetry
Package opentelemetry sets up the OpenTelemetry metrics and tracing of the relay proxy.
Package opentelemetry sets up the OpenTelemetry metrics and tracing of the relay proxy.
Package bootstrap defines the version 2 bootstrap file of the relay proxy: its schema, a strict loader that reports path- and line-addressed errors, the secret references, the explicit environment overrides, the defaults table, the redacted effective print and the JSON Schema.
Package bootstrap defines the version 2 bootstrap file of the relay proxy: its schema, a strict loader that reports path- and line-addressed errors, the secret references, the explicit environment overrides, the defaults table, the redacted effective print and the JSON Schema.
Package configsync lets the OFREP bulk evaluation answer a client that was notified of a newer configuration than the one the relay has loaded: the relay checks its control plane first, within a bound, and answers with what it then has.
Package configsync lets the OFREP bulk evaluation answer a client that was notified of a newer configuration than the one the relay has loaded: the relay checks its control plane first, within a bound, and answers with what it then has.
Package controlsource connects the manifest reader to the runtime: it turns every manifestreader.Snapshot into a flagruntime.Content and hands it to the engine.
Package controlsource connects the manifest reader to the runtime: it turns every manifestreader.Snapshot into a flagruntime.Content and hands it to the engine.
Package corehttp serves the HTTP API of the relay proxy (the evaluation endpoints, the flag configuration, the flag change, the collection of events and the streams of changes) from a relaycore.Core.
Package corehttp serves the HTTP API of the relay proxy (the evaluation endpoints, the flag configuration, the flag change, the collection of events and the streams of changes) from a relaycore.Core.
Package events holds the runtime-level exporters, the event channel and the notifiers of the relay proxy.
Package events holds the runtime-level exporters, the event channel and the notifiers of the relay proxy.
kafka
Package kafka implements the SCRAM client used to authenticate against Kafka.
Package kafka implements the SCRAM client used to authenticate against Kafka.
Package flagruntime holds the immutable runtime of the relay proxy and the reconcile engine that replaces it.
Package flagruntime holds the immutable runtime of the relay proxy and the reconcile engine that replaces it.
keyindex
Package keyindex is the lookup table of API keys: a lookup costs a bounded amount whatever the key a client presents.
Package keyindex is the lookup table of API keys: a lookup costs a bounded amount whatever the key a client presents.
handler
manifest
Package manifest implements the HTTP handler that returns the flag manifest of a flagset.
Package manifest implements the HTTP handler that returns the flag manifest of a flagset.
ofrep
Package ofrep implements the OFREP evaluation handlers of the relay proxy.
Package ofrep implements the OFREP evaluation handlers of the relay proxy.
semaphore
Package semaphore implements the Semaphore HTTP handlers of the relay proxy.
Package semaphore implements the Semaphore HTTP handlers of the relay proxy.
Package helper provides the request, header and HTTP error helpers of the relay proxy.
Package helper provides the request, header and HTTP error helpers of the relay proxy.
Package metric defines the Prometheus metrics exposed by the relay proxy.
Package metric defines the Prometheus metrics exposed by the relay proxy.
Package model defines the request and response models of the relay proxy HTTP API.
Package model defines the request and response models of the relay proxy HTTP API.
Package modeldocs holds the documentation stubs of the relay proxy OpenAPI document.
Package modeldocs holds the documentation stubs of the relay proxy OpenAPI document.
Package relayapp wires and runs the relay proxy: the command line, the start, the reloads and the ordered stop.
Package relayapp wires and runs the relay proxy: the command line, the start, the reloads and the ordered stop.
Package relaycore assembles the config v2 relay core from a loaded bootstrap file: the connections, the object store of the control plane, the state directory, the manifest reader, the source that feeds the reconcile engine, the engine with its holder and evaluator, and the exporters and notifiers of the events package.
Package relaycore assembles the config v2 relay core from a loaded bootstrap file: the connections, the object store of the control plane, the state directory, the manifest reader, the source that feeds the reconcile engine, the engine with its holder and evaluator, and the exporters and notifiers of the events package.
Package segmentobs observes the resolvers of the dynamic segments for Prometheus.
Package segmentobs observes the resolvers of the dynamic segments for Prometheus.
Package segmentstore tells the relay which kinds of connection of the bootstrap file can serve segments, and in which modes.
Package segmentstore tells the relay which kinds of connection of the bootstrap file can serve segments, and in which modes.
Package service manages the flagsets and the feature flag clients used by the relay proxy.
Package service manages the flagsets and the feature flag clients used by the relay proxy.
stream
Package stream implements the SSE and WebSocket streams that push flag changes to clients.
Package stream implements the SSE and WebSocket streams that push flag changes to clients.
Package tlscert serves the certificate of a TLS listener and reloads it when its files change, without a restart and without touching the connections that are open.
Package tlscert serves the certificate of a TLS listener and reloads it when its files change, without a restart and without touching the connections that are open.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL