View Source Hologram.Router.PageModuleResolver behaviour (hologram v0.2.0)

Summary

Callbacks

Returns the key of the persistent term used by the page module resolver registered process.

Functions

Returns a specification to start this module under a supervisor.

Returns the implementation of the page module resolver's persistent term key.

Reloads the persistent term that stores the search tree used for page module resolving.

Given a request path it returns the page module that handles it.

Starts page module resolver process.

Callbacks

persistent_term_key()

@callback persistent_term_key() :: any()

Returns the key of the persistent term used by the page module resolver registered process.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

persistent_term_key()

@spec persistent_term_key() :: any()

Returns the implementation of the page module resolver's persistent term key.

reload()

@spec reload() :: :ok

Reloads the persistent term that stores the search tree used for page module resolving.

resolve(request_path)

@spec resolve(String.t()) :: module()

Given a request path it returns the page module that handles it.

start_link(list)

@spec start_link(keyword()) :: GenServer.on_start()

Starts page module resolver process.