Documentation
¶
Overview ¶
Package featureflags provides a shared client for evaluating feature flags against the flagd sidecar injected into a pod by the OpenFeature Operator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client evaluates feature flags. Every method fails open: if the flagd sidecar is unreachable or an evaluation errors, the caller-supplied default is returned rather than blocking or propagating the error - a briefly unavailable sidecar must degrade to "flag off," not "service won't start."
func New ¶
New creates a feature-flag client for serviceName, wired to the flagd sidecar injected into this pod by the OpenFeature Operator. The sidecar runs on localhost, so the provider uses its default RPC-mode configuration (host "localhost", port 8013) rather than a cluster-DNS address.
Provider setup is asynchronous (openfeature.SetProvider does not block) so a slow-starting or unreachable sidecar never delays service startup; evaluations made before the provider is ready simply fail open.