OpenFeature.Provider.Flagd.HTTP (OpenFeature Flagd v0.1.0)
View SourceOpenFeature provider for flagd that communicates with a flagd
instance over HTTP.
This is a remote flagd provider that uses the HTTP evaluation API (JSON) to resolve flag values.
Summary
Functions
Creates a new flagd HTTP provider.
Types
@type t() :: %OpenFeature.Provider.Flagd.HTTP{ domain: String.t() | nil, hooks: [OpenFeature.Hook.t()], host: String.t(), name: String.t(), port: pos_integer(), req: Req.Request.t() | nil, req_opts: keyword(), scheme: String.t(), state: :not_ready | :ready }
HTTP provider for flagd
Functions
Creates a new flagd HTTP provider.
Options
:scheme
- The URL scheme (default:"http"
):host
- The hostname or IP address of the flagd instance (default:"localhost"
):port
- The port number (default:8013
):name
- (optional) Custom name for the provider (default:"FlagdHTTP"
):domain
- (optional) Domain name to differentiate between providers:hooks
- (optional) A list of OpenFeature hooks (%OpenFeature.Hook{}):req_opts
- (optional) Keyword list passed toReq.new/1
Examples
# Simple usage with defaults
provider = OpenFeature.Provider.Flagd.HTTP.new()
# With custom options
provider = OpenFeature.Provider.Flagd.HTTP.new(port: 8013, domain: "my-service")
# With HTTPS
provider = OpenFeature.Provider.Flagd.HTTP.new(scheme: "https", host: "flagd.example.com")