Mnemonics v0.4.0 Mnemonics.Memory View Source

Own an ETS.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor

:state => Reply the state

Link to this section Types

Link to this type init_args() View Source
init_args() :: [
  module: module(),
  table_name: atom(),
  version: pos_integer(),
  ets_dir: binary()
]
Link to this type t() View Source
t() :: %{
  tid: :ets.tid(),
  pid: pid(),
  module: module(),
  table_name: atom(),
  version: pos_integer()
}

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function handle_call(msg, from, state) View Source
handle_call(:state, GenServer.from(), t()) :: {:reply, t(), t()}
handle_call(:stop, GenServer.from(), t()) :: {:stop, :normal, t()}
handle_call({:write, (t() -> any())}, GenServer.from(), t()) ::
  {:reply, any() | {:error, any()}, t()}

:state => Reply the state.

:stop => Delete the ETS & stop.