Tay.Storage.Native (tay v0.7.0)

Copy Markdown View Source

Internal, versioned filesystem Port protocol. Calls run only in the Port owner. Every uncertain operation poisons this connection; it is never retried. The helper is the sole holder of locks and writable descriptors.

Summary

Types

t()

@type t() :: %Tay.Storage.Native{
  cold?: term(),
  deadline: term(),
  facts: term(),
  generation: term(),
  owner: term(),
  port: term(),
  timeout: term()
}

Functions

check(native)

close(native)

close_read(native)

close_write(native)

create_stage(native, scope, name)

enable_mutations(native)

Promotes this continuously held inspection session; never reacquires ownership.

info(native)

list(native, scope)

mkdir_segments(native)

open(path, options \\ [])

open_active(native, name, identity)

open_existing(path, options \\ [])

Acquires only existing ownership objects; no creation or sync is allowed.

open_read(native, scope, name)

publish(native, scope, source, target, identity)

read(native, offset, length)

shutdown(native)

sync(native)

sync_dir(native, scope)

sync_read(native)

v2_adopt_v1(native, nonce)

v2_begin(native, nonce)

Creates a private candidate epoch and its segments directory under the held lock.

v2_clear_adoption(native)

v2_publish_current(native, stage, source, previous)

v2_publish_epoch(native, epoch_id)

v2_reclaim(native, target, current, intent \\ nil)

Unlinks only a verified non-CURRENT predecessor via pinned descriptors.

v2_restore_v1(native, nonce)

Restores the exact intent-named V1 source when CURRENT is absent.

v2_select(native, epoch_id)

Pins the CURRENT-named epoch and its mutable segments directory.

v2_space(native)

write(native, offset, bytes)