Skip to content

Commit

Permalink
Fix Config Worker Types (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
maennchen authored Nov 4, 2024
1 parent 60acaf6 commit 1e64254
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/oidcc/provider_configuration/worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ defmodule Oidcc.ProviderConfiguration.Worker do
@type opts() :: %{
optional(:name) => GenServer.name(),
required(:issuer) => :uri_string.uri_string(),
optional(:provider_configuration_opts) => :oidcc_provider_configuration.opts()
optional(:provider_configuration_opts) => :oidcc_provider_configuration.opts(),
optional(:backoff_min) => :oidcc_backoff.min(),
optional(:backoff_max) => :oidcc_backoff.max(),
optional(:backoff_type) => :oidcc_backoff.type()
}

@doc """
Expand All @@ -38,15 +41,15 @@ defmodule Oidcc.ProviderConfiguration.Worker do
...> })
"""
@doc since: "3.0.0"
@spec start_link(opts :: :oidcc_provider_configuration_worker.opts()) :: GenServer.on_start()
@spec start_link(opts :: opts()) :: GenServer.on_start()
def start_link(opts)

def start_link(%{name: name} = opts) when is_atom(name),
do: start_link(%{opts | name: {:local, name}})
do: :oidcc_provider_configuration_worker.start_link(%{opts | name: {:local, name}})

def start_link(opts), do: :oidcc_provider_configuration_worker.start_link(opts)

@spec child_spec(opts :: :oidcc_provider_configuration_worker.opts()) :: Supervisor.child_spec()
@spec child_spec(opts :: opts()) :: Supervisor.child_spec()
def child_spec(opts),
do:
Supervisor.child_spec(
Expand Down

0 comments on commit 1e64254

Please sign in to comment.