annon_api v0.16.2 Annon.Configuration.CacheAdapter behaviour

Adapter for API Gateway configuration loaders.

Link to this section Summary

Callbacks

Updates cache information when configuration is changed

Initializes configuration adapter

Returns oldest API and associated Plugins that matches request parameters

Link to this section Callbacks

Link to this callback config_change(opts)
config_change(opts :: Keyword.t()) :: :ok

Updates cache information when configuration is changed.

Link to this callback init(opts)
init(opts :: Keyword.t()) :: :ok

Initializes configuration adapter.

Link to this callback match_request(scheme, method, host, port, path, opts)
match_request(
  scheme :: String.t(),
  method :: String.t(),
  host :: String.t(),
  port :: number(),
  path :: String.t(),
  opts :: Keyword.t()
) :: {:ok, Map.t()} | {:error, :not_found}

Returns oldest API and associated Plugins that matches request parameters.