XMAVLink.Util.Tables (xmavlink v0.14.3)

Copy Markdown View Source

Utility ETS table name helpers.

Most applications should use XMAVLink.Util.CacheManager query functions instead of reading ETS tables directly. When an integration needs table names for supervision or migration code, use this module rather than hard-coding global names such as :messages, :systems, :params, and :sessions.

Summary

Functions

Return one utility table name for a context, prefix, or options.

Return all utility table names for a context, prefix, or options.

Types

kind()

@type kind() :: :messages | :systems | :params | :sessions

opts_or_prefix()

@type opts_or_prefix() ::
  keyword()
  | %{optional(:table_prefix) => prefix()}
  | XMAVLink.Util.Context.t()
  | prefix()

prefix()

@type prefix() :: atom() | String.t() | nil

Functions

name(kind, opts_or_prefix \\ [])

@spec name(kind(), opts_or_prefix()) :: atom()

Return one utility table name for a context, prefix, or options.

names(opts_or_prefix \\ [])

@spec names(opts_or_prefix()) :: %{required(kind()) => atom()}

Return all utility table names for a context, prefix, or options.