KinoPhoenixLiveView.DynamicRouterPlug (kino_phoenix_live_view v0.1.2)

A plug that dynamically dispatches requests to a router defined in the application configuration.

This plug retrieves the router from the application environment and invokes its call/2 function to handle the request.

Summary

Functions

Delegates the connection to the dynamically configured router.

Initializes the plug with the given options.

Functions

call(conn, opts)

Delegates the connection to the dynamically configured router.

It fetches the router module from the application environment and invokes its call/2 callback.

Parameters

  • conn: The connection struct.
  • _opts: Unused options.

Returns

  • The updated connection after the router has processed it.

init(opts)

Initializes the plug with the given options.

Parameters

  • opts: The plug options.

Returns

  • The unchanged options.