Helios v0.1.0 Helios.Endpoint behaviour View Source

Entry point for domain.

It holds

Example

defmodule MyApp.Endpoint do

use Helios.Endpoint, otp_app: :my_app

# add any plugs you need since endpoint behavise like pipeline
# plug MyApp.SomePlug

plug MyApp.Router

end

Link to this section Summary

Callbacks

Get configuration for given endpoint

Initializes endpoint configuration

Allows instrumenting operation defined by function

Starts endpoint supervision tree

Link to this section Types

Link to this section Callbacks

Link to this callback config(key, default) View Source
config(key :: atom(), default :: term()) :: term()

Get configuration for given endpoint.

Link to this callback init(atom, config) View Source
init(:supervisor, config :: Keyword.t()) :: {:ok, Keyword.t()}

Initializes endpoint configuration

Link to this macrocallback instrument(instrument_event, runtime_metadata, funcion) View Source
instrument(
  term(),
  instrument_event :: Macro.t(),
  runtime_metadata :: Macro.t(),
  funcion :: Macro.t()
) :: Macro.t()

Allows instrumenting operation defined by function.

runtime_metadata may be omitted and defaults to nil.

Read more about instrumentation in the “Instrumentation” section.

Starts endpoint supervision tree.