View Source Unleash.Client behaviour (Unleash v2.0.0-git-49f4)
HTTP Client responsible for communicating with the Unleash API Server.
Summary
Types
Type representing the result of attempting to fetch features from the Unleash API.
Types
@type features_result() :: {String.t(), Unleash.Features.t()} | {nil, atom() | String.t()} | :cached
Type representing the result of attempting to fetch features from the Unleash API.
It can be:
{etag, features}when fetched fresh features from the API and correspondent new HTTP etag.{nil, reason}in case of errors.:cachedin case of HTTP-level caching
Callbacks
@callback features(String.t()) :: features_result()
@callback metrics(map()) :: Req.Response.t()
@callback register_client() :: Req.Response.t()