CaddyServer (CaddyServer v0.3.0)

Documentation for CaddyServer.

Link to this section Summary

Functions

Return Caddyfile content

Returns a specification to start this module under a supervisor.

Return path of caddy server binary

Return GenServer state, %{port: Port.t()}

Callback implementation for GenServer.init/1.

Start caddy server by using config return in caddyfile()

Stop caddy server using system kill command

Return Caddy Version from Application.get_env(:caddy_server, CaddyServer) |> Keyword.get(:version)

Link to this section Functions

@spec caddyfile() :: binary()

Return Caddyfile content

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

@spec cmd() :: binary()

Return path of caddy server binary

@spec get_state() :: %{port: Port.t() | nil}

Return GenServer state, %{port: Port.t()}

Link to this function

handle_continue(atom, state)

Callback implementation for GenServer.handle_continue/2.

Callback implementation for GenServer.init/1.

@spec start() :: :ignore | {:error, any()} | {:ok, pid()}

Start caddy server by using config return in caddyfile()

@spec stop() :: non_neg_integer()

Stop caddy server using system kill command

@spec version() :: binary()

Return Caddy Version from Application.get_env(:caddy_server, CaddyServer) |> Keyword.get(:version)

if not defined, use @default_version instead