Raxol.Terminal.Sync.Manager (Raxol v0.5.0)

View Source

Manages synchronization between different terminal components (splits, windows, tabs). Provides a high-level interface for component synchronization and state management.

Summary

Types

component_id()

@type component_id() :: String.t()

component_type()

@type component_type() :: :split | :window | :tab

sync_state()

@type sync_state() :: %{
  component_id: component_id(),
  component_type: component_type(),
  state: term(),
  metadata: %{
    version: non_neg_integer(),
    timestamp: non_neg_integer(),
    source: String.t()
  }
}

t()

@type t() :: %Raxol.Terminal.Sync.Manager{
  components: %{required(String.t()) => Raxol.Terminal.Sync.Component.t()},
  sync_id: String.t()
}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

do_sync_state(state, component_id, component_type, new_state, opts)

generate_sync_id(state)

get_component_stats(component_id)

get_state(component_id)

register_component(component_id, component_type, initial_state \\ %{})

start_link(opts \\ [])

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

Starts the sync manager.

sync_state(component_id, component_type, new_state, opts \\ [])

@spec sync_state(String.t(), String.t(), term(), keyword()) :: :ok

Syncs a component's state.

unregister_component(component_id)