View Source Storex.Registry behaviour (storex v0.2.5)

Summary

Callbacks

Returns store PID by session id and store id.

Register session PID with a session id.

Register store PID in session by id with store id.

Gets session PID by session id.

Return list of stores registered with session id.

Unregister session with a session id.

Unegister store in session by id with store id.

Callbacks

Link to this callback

get_store_pid(session, store)

View Source
@callback get_store_pid(session :: String.t(), store :: String.t()) :: pid() | :undefined

Returns store PID by session id and store id.

Link to this callback

register_session(session, pid)

View Source
@callback register_session(session :: String.t(), pid()) :: {:ok, pid()} | :error

Register session PID with a session id.

Link to this callback

register_store(session, store, pid)

View Source
@callback register_store(session :: String.t(), store :: String.t(), pid()) ::
  {:ok, pid()} | :error

Register store PID in session by id with store id.

@callback session_pid(session :: String.t()) :: pid() | :undefined

Gets session PID by session id.

@callback session_stores(session :: String.t()) :: [String.t()]

Return list of stores registered with session id.

Link to this callback

unregister_session(session)

View Source
@callback unregister_session(session :: String.t()) :: :ok | :error

Unregister session with a session id.

Link to this callback

unregister_store(session, store)

View Source
@callback unregister_store(session :: String.t(), store :: String.t()) :: :ok | :error

Unegister store in session by id with store id.