MingaEditor.Renderer.Server (Minga v0.1.0)

Copy Markdown View Source

Renderer process wrapper.

All frame, acknowledgement, timeout, and recovery workflows live in focused handler modules. This module exposes the process API and keeps OTP callbacks as routing-only clauses.

Summary

Functions

Returns current recovery generation and acknowledged frame sequence.

Queues the latest semantic frame intent for asynchronous rendering.

Returns a specification to start this module under a supervisor.

Routes a typed frontend frame status to the renderer.

Records one-shot adaptation evidence bound to an outstanding rejected transaction.

Runs one frame synchronously inside this renderer process.

Returns true while rendering or awaiting frontend credit.

Requests recovery of the outstanding renderer transaction.

Abandons the old frontend connection and renders a fresh keyframe.

Resets frontend state and renders a synchronous recovery keyframe.

Returns the visible terminal frontend failure, if one has stopped frame credit.

Types

Functions

acknowledgement_state(server \\ __MODULE__)

@spec acknowledgement_state(GenServer.server()) ::
  {non_neg_integer(), non_neg_integer()}

Returns current recovery generation and acknowledged frame sequence.

cast_snapshot(server \\ __MODULE__, snapshot, frame_seq)

Queues the latest semantic frame intent for asynchronous rendering.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

frame_status(server \\ __MODULE__, status)

Routes a typed frontend frame status to the renderer.

record_adaptation(server \\ __MODULE__, generation, frame_seq, dimension, rejected_value, adapted_value, adapted_intent)

Records one-shot adaptation evidence bound to an outstanding rejected transaction.

render_sync(server, snapshot, frame_seq)

Runs one frame synchronously inside this renderer process.

rendering?(server \\ __MODULE__)

@spec rendering?(GenServer.server()) :: boolean()

Returns true while rendering or awaiting frontend credit.

request_recovery(server \\ __MODULE__)

@spec request_recovery(GenServer.server()) :: :ok

Requests recovery of the outstanding renderer transaction.

reset_connection(server \\ __MODULE__, snapshot, frame_seq)

Abandons the old frontend connection and renders a fresh keyframe.

reset_sync(server, intent, frame_seq)

Resets frontend state and renders a synchronous recovery keyframe.

start_link(opts \\ [])

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

terminal_failure(server \\ __MODULE__)

@spec terminal_failure(GenServer.server()) ::
  MingaEditor.Renderer.RejectionState.terminal() | nil

Returns the visible terminal frontend failure, if one has stopped frame credit.