Packages

A simple Elixir package that provides circuit breaker manager

Current section

Files

Jump to
virgil lib application.ex
Raw

lib/application.ex

defmodule Virgil.Application do
@moduledoc false
use Application
alias Virgil.Telemetry.CircuitHandler
def start(_type, _args) do
:telemetry.attach_many(
"circuit-breaker-manager-handler",
[
[:virgil, :circuit, :failure],
[:virgil, :circuit, :success]
],
&CircuitHandler.handle_event/4,
nil
)
children = [
{Virgil.Manager.ETSManager, []}
]
Supervisor.start_link(children, name: Virgil.Supervisor, strategy: :one_for_one)
end
end