LexLeo 0.0.0-dev+f8e5087-dirty
Technical documentation
Loading...
Searching...
No Matches
fs_stream

Purpose

The fs_stream module provides a file-backed adapter for the stream port in the foundation layer.

It provides:

  • Composition Root helpers for building default adapter configuration and environment objects,
  • direct creation of file-backed stream_t handles from fs_stream-specific creation arguments,
  • factory-registration support through adapter descriptors compatible with the stream factory.

The module is designed to connect:

  • the generic stream port,
  • the OSAL file abstraction,
  • the Composition Root wiring used to inject file and memory dependencies.

Public API

Sub-APIs:

Architectural role

The fs_stream module is a foundation adapter module for the stream port. It implements the stream backend contract on top of OSAL file operations and exposes Composition Root entry points for direct creation and factory registration.

Typical responsibilities:

  • translate fs_stream_args_t creation arguments into OSAL file opening,
  • create file-backed stream_t handles through the stream port,
  • package adapter configuration and injected dependencies for Composition Root use,
  • produce stream_adapter_desc_t descriptors for registration into the stream factory.

Main concepts

Direct adapter creation

The Composition Root can create a file-backed stream directly through:

Factory registration

The Composition Root can register the adapter into a stream factory through:

Injected dependencies

The adapter relies on injected dependencies grouped in fs_stream_env_t, typically including:

  • OSAL file environment data,
  • OSAL file operations,
  • the underlying stream port environment.

Related modules

This adapter is part of the surrounding stream family and targets the stream port.

See also