mirror of
https://github.com/team-alembic/ash_authentication.git
synced 2024-09-20 21:33:10 +12:00
18 lines
398 B
Elixir
18 lines
398 B
Elixir
|
defmodule DevServer.Session do
|
||
|
@moduledoc """
|
||
|
Does nothing but own an ETS table for the session to be stored in.
|
||
|
"""
|
||
|
|
||
|
use GenServer
|
||
|
|
||
|
@doc false
|
||
|
def start_link(opts), do: GenServer.start_link(__MODULE__, opts, [])
|
||
|
|
||
|
@doc false
|
||
|
@impl true
|
||
|
def init(_) do
|
||
|
table_ref = :ets.new(__MODULE__, [:named_table, :public, read_concurrency: true])
|
||
|
{:ok, table_ref, :hibernate}
|
||
|
end
|
||
|
end
|