mapi v0.3.0 Mapi

Link to this section Summary

Functions

Callback implementation for Plug.call/2

Callback implementation for Plug.init/1

Starts a Mapi server with given opts

Stops a running Mapi server

Link to this section Functions

Link to this function call(conn, opts)

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.

Link to this function start(mod, opts)
start(module(), Keyword.t()) ::
  {:ok, reference()} | {:error, :eaddrinuse} | {:error, term()}

Starts a Mapi server with given opts.

Examples

iex> {:ok, ref} = Mapi.start(String, [port: 8000])
iex> is_reference(ref)
true
iex> Mapi.start(Enum, [port: 8000])
{:error, :eaddrinuse}
Link to this function stop(ref)
stop(reference()) :: :ok

Stops a running Mapi server.

Examples

iex> {:ok, ref} = Mapi.start(String, [port: 8001])
iex> Mapi.stop(ref)
:ok