annon_api v0.16.2 Annon.Configuration.Matcher

This module is responsible for configuration lookups for each request.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor

Notifies cache adapter about configuration change

Initializes matcher state

Returns API and associated Plugins by a request parameters

Link to this section Functions

Link to this function child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function config_change(pid \\ __MODULE__)

Notifies cache adapter about configuration change.

Initializes matcher state.

It accepts two options:

  • adapter - cache adapter.
  • cache_space - unique cache space key if multiple matcher processes are started.
Link to this function match_request(pid \\ __MODULE__, scheme, method, host, port, path)

Returns API and associated Plugins by a request parameters.

This function receives adapter by casting GenServer and applies match in calling process context to reduce single-process bottleneck.

Adapter should expect their match functions to be read-concurrent from other processes.

Link to this function start_link(opts, name \\ __MODULE__)