Cringe.Runtime (cringe v0.1.0)

Copy Markdown View Source

Supervised runtime for Cringe apps.

Summary

Types

start_opt()

@type start_opt() ::
  {:app, module()}
  | {:opts, keyword()}
  | {:name, GenServer.name()}
  | {:backend, {module(), keyword()}}
  | Cringe.Renderer.render_opts()

Functions

backend_state(server)

@spec backend_state(GenServer.server()) :: term()

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

dispatch(server, event)

@spec dispatch(GenServer.server(), term()) :: :ok

paint(server)

@spec paint(GenServer.server()) :: :ok | {:error, term()}

start_link(opts)

@spec start_link([start_opt()]) :: GenServer.on_start()

state(server)

@spec state(GenServer.server()) :: term()

text(server)

@spec text(GenServer.server()) :: String.t()