View Source Wayfarer.Target.TotalConnections (wayfarer v0.6.1)

A simple ETS table that tracks the total number of requests for each target.

Summary

Functions

Returns a specification to start this module under a supervisor.

Increment the health check connection counter for the specified target.

Increment the proxy connection counter for the specified target.

Return the total number of proxy requests for the provided targets.

Return the total number of requests for the provided targets.

Types

@type state() :: %{table: :ets.tid(), timer: :timer.tref()}

Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

health_check_connect(target)

View Source
@spec health_check_connect(Wayfarer.Router.target()) :: :ok

Increment the health check connection counter for the specified target.

@spec proxy_connect(Wayfarer.Router.target()) :: :ok

Increment the proxy connection counter for the specified target.

@spec proxy_count(Wayfarer.Router.target() | [Wayfarer.Router.target()]) :: %{
  required(Wayfarer.Router.target()) => non_neg_integer()
}

Return the total number of proxy requests for the provided targets.

@spec request_count(Wayfarer.Router.target() | [Wayfarer.Router.target()]) :: %{
  required(Wayfarer.Router.target()) => %{
    proxied: non_neg_integer(),
    health_checks: non_neg_integer()
  }
}

Return the total number of requests for the provided targets.