Core LibraryunreleasedAPI Reference

Choose documentation 1

latest

Current version

latest
English

Unreleased libtmux_erlang has not been released. Its API may change during development. This site's structure and URLs may change too.

module libtmux-erlang latest

tmux_snapshot

Read an immutable captured graph without performing tmux I/O.

Source and package
Qualified name
tmux_snapshot
Package
libtmux_erlang
Source
apps/libtmux_erlang/src/tmux_snapshot.erl
tmux_snapshot

Description#

Server-wide lists use numeric ID order. Window links retain every membership, including multiple indexes for the same window in one session. Session windows are unique in first-link order; panes within a window use pane index order. related/3 accepts a row from this snapshot and returns a tagged result. A row from another observation cannot silently select a relationship in this one.

metadata/1 records source calls, the capture interval, endpoint generation and the observed server incarnation. Captures span commands and are not atomic. Values remain readable after their endpoint closes; actions still validate the row's registered origin. Coverage distinguishes unloaded data from an empty collection and unavailable fields from known absence. See the graph guide for physical windows and session memberships.

Members17#

Collections and queries4#

  • sessions/1 function Return captured sessions in numeric ID order. Performs no I/O and raises incomplete_snapshot when that collection was not captured.
  • windows/1 function Return unique captured physical windows in numeric ID order. Performs no I/O. Use window_links/1 for session-relative membership and indexes.
  • panes/1 function Return unique captured physical panes in numeric ID order without I/O. related/3 orders panes within a window by pane index.
  • related/3 function Traverse a complete captured relationship without I/O. To-many relations return lists; to-one relations return a row or known absence. The input row must belong to this snapshot. Unloaded relations and mismatched rows return tagged errors.

Common operations1#

  • metadata/1 function Return capture identity, server generation, source calls, capabilities and read interval metadata. Does not refresh the graph or imply atomic capture.

Other members12#

  • coverage/0 typealias Per-entity coverage. Use require/2 to check requirements before evaluation.
  • coverage/1 function Return per-collection, field and relationship coverage. Loaded values, known absence, not_loaded and unavailable capabilities have distinct meanings. Performs no I/O.
  • entity_coverage/0 typealias Collection completeness, field availability and relationship completeness. A loaded field can hold a known value or known absence; inspect the row to distinguish them. not_loaded never means empty, and unavailable never means known absence. Completeness is relative to the captured source collection.
  • get/3 function Look up a row in this capture by ID, or a session/index/window tuple for a window link. Returns none for a known missing identity and a tagged coverage error for an unloaded collection. Performs no I/O.
  • metadata/0 typealias Capture identity and provenance. id identifies this snapshot, origin its registered endpoint and generation the endpoint lifetime. model_version names the row representation. graph describes relationship coverage, not atomicity.
  • query_metadata/0 typealias Source-query capture diagnostics. candidate_count is the deduplicated candidate identity count before local residuals and limits. pushed_down records a nontrivial native condition in the plan, not proof that its command ran: empty collections can skip it. source_calls records actual capture commands. The flag does not mean the full predicate was translated. attempt starts at one and increases only for an explicitly requested retry.
  • require/2 function Check every declared collection/field/relationship requirement before local evaluation. Returns an incomplete_snapshot error with missing requirements when the capture cannot answer faithfully. Performs no I/O, even on empty data.
  • requirement/0 typealias A collection, field or complete relationship needed for faithful local evaluation.
  • rows/2 function Return a captured collection by schema entity. Performs no I/O. An unloaded collection raises incomplete_snapshot rather than appearing empty.
  • source_call/0 typealias One completed capture command and its stdout byte count. started and finished are local monotonic microseconds, not wall-clock timestamps. The interval includes identity preflight and command completion; it is not an atomic read.
  • t/0 typealias An immutable captured graph with identity, indexes, coverage and source intervals.
  • window_links/1 function Return every captured membership, ordered by numeric session ID, index and window ID. Multiple links to the same physical window are preserved. Performs no I/O; link identity belongs to this snapshot.

Guides#

Pages that discuss tmux_snapshot.

Esc

Type to search.

Reference previewOpen reference