Public shared-mode configuration facade.
Use this module when an application needs child specs or backend health checks for the shared backend configured on a canvas.
Summary
Functions
Exercises a shared backend with a generated shared canvas.
Bang variant of backend_health_check/1.
Returns child specs for the given backend declaration.
Returns the configured local backend used when no backend is supplied.
Normalizes a shared backend declaration into the runtime backend record.
Returns a LiveView session map containing shared participant metadata.
Projects canonical shared canvas state for a participant client id.
Types
@type backend() :: LivePanels.Canvas.Shared.Backend.t()
@type backend_health_check_report() :: LivePanels.Canvas.Shared.Backend.backend_health_check_report()
Functions
@spec backend_health_check(keyword()) :: {:ok, backend_health_check_report()} | {:error, term()}
Exercises a shared backend with a generated shared canvas.
@spec backend_health_check!(keyword()) :: backend_health_check_report()
Bang variant of backend_health_check/1.
@spec child_specs(backend_spec()) :: [Supervisor.child_spec()]
Returns child specs for the given backend declaration.
@spec default() :: backend()
Returns the configured local backend used when no backend is supplied.
@spec normalize!(backend_spec()) :: backend()
Normalizes a shared backend declaration into the runtime backend record.
Returns a LiveView session map containing shared participant metadata.
@spec project_state(LivePanels.Canvas.State.t(), String.t(), map(), map()) :: LivePanels.Canvas.State.t()
Projects canonical shared canvas state for a participant client id.