acl v0.1.9 AclWeb.Endpoint

Link to this section Summary

Functions

Returns all sockets configured in this endpoint

Broadcasts a msg as event in the given topic

Broadcasts a msg as event in the given topic

Broadcasts a msg from the given from as event in the given topic

Broadcasts a msg from the given from as event in the given topic

Callback implementation for Plug.call/2

Returns the endpoint configuration for key

Reloads the configuration given the application environment changes

Returns the host for the given endpoint

Callback implementation for Plug.init/1

Callback invoked for dynamically configuring the endpoint

Generates the path information when routing to this endpoint

Generates the script name

Starts the endpoint supervision tree

Generates a route to a static file in priv/static

Generates the static URL without any path information

Generates the endpoint base URL but as a URI struct

Unsubscribes the caller from the given topic

Generates the endpoint base URL without any path information

Link to this section Functions

Returns all sockets configured in this endpoint.

Link to this function

broadcast(topic, event, msg)

Broadcasts a msg as event in the given topic.

Callback implementation for Phoenix.Endpoint.broadcast/3.

Link to this function

broadcast!(topic, event, msg)

Broadcasts a msg as event in the given topic.

Raises in case of failures.

Callback implementation for Phoenix.Endpoint.broadcast!/3.

Link to this function

broadcast_from(from, topic, event, msg)

Broadcasts a msg from the given from as event in the given topic.

Callback implementation for Phoenix.Endpoint.broadcast_from/4.

Link to this function

broadcast_from!(from, topic, event, msg)

Broadcasts a msg from the given from as event in the given topic.

Raises in case of failures.

Callback implementation for Phoenix.Endpoint.broadcast_from!/4.

Link to this function

call(conn, opts)

Callback implementation for Plug.call/2.

Link to this function

config(key, default \\ nil)

Returns the endpoint configuration for key

Returns default if the key does not exist.

Link to this function

config_change(changed, removed)

Reloads the configuration given the application environment changes.

Returns the host for the given endpoint.

Callback implementation for Plug.init/1.

Link to this function

init(key, config)

Callback invoked for dynamically configuring the endpoint.

It receives the endpoint configuration and checks if configuration should be loaded from the system environment.

Link to this macro

instrument(event, runtime \\ Macro.escape(%{}), fun) (macro)

Instruments the given function.

event is the event identifier (usually an atom) that specifies which instrumenting function to call in the instrumenter modules. runtime is metadata to be associated with the event at runtime (e.g., the query being issued if the event to instrument is a DB query).

Examples

instrument :render_view, %{view: "index.html"}, fn ->
  render conn, "index.html"
end

Generates the path information when routing to this endpoint.

Generates the script name.

Link to this function

start_link(opts \\ [])

Starts the endpoint supervision tree.

Link to this function

static_path(path)

Generates a route to a static file in priv/static.

Generates the static URL without any path information.

It uses the configuration under :static_url to generate such. It falls back to :url if :static_url is not set.

Generates the endpoint base URL but as a URI struct.

It uses the configuration under :url to generate such. Useful for manipulating the URL data and passing it to URL helpers.

Link to this function

subscribe(topic)

Link to this function

subscribe(pid, topic, opts)

Link to this function

unsubscribe(topic)

Unsubscribes the caller from the given topic.

Callback implementation for Phoenix.Endpoint.unsubscribe/1.

Generates the endpoint base URL without any path information.

It uses the configuration under :url to generate such.