Skip to main content

Crate ruststream_sea_file

Crate ruststream_sea_file 

Source
Expand description

File and stdio stream implementation of the RustStream broker contract, built on sea-streamer.

The gap this crate fills: running a service against a persistent stream without an external broker. Two transports in one crate, over sea-streamer-file and sea-streamer-stdio:

  • FileBroker - a persistent, replayable stream on disk: survives restarts, records and replays, and repositioning is first-class - FileSubscriber implements the framework’s Seekable capability with pinned captured positions (a sequence rewind is inclusive) plus beginning/end/timestamp forms.
  • StdioBroker - standard input and output as one stream, so a service becomes a stage of a shell pipeline; something no network broker can offer.

Honest scope: the client keeps no consumer positions (its resumable mode is unimplemented upstream), so acknowledgement reports AckError::Unsupported on both transports - resume explicitly via the descriptor’s start position or a captured FilePosition. Payloads are plain bytes with no header space, so user headers travel in a text-safe envelope applied only when headers are present - a file written without headers stays readable as a plain payload stream by other tools. The file transport does not build on Windows (an upstream constraint).

Structs§

ConnectedFileBroker
The typed witness that connect succeeded: the file is open.
ConnectedStdioBroker
The typed witness that connect succeeded.
FileBroker
A persistent, replayable stream on disk for the RustStream messaging framework: what survives restarts, records for replay, and needs no external broker.
FilePublish
The publish policy for FilePublisher.
FilePublisher
Publishes messages into the stream file.
FileSeeker
Repositions a FileSubscriber while its stream runs; minted by Seekable::seeker.
FileStream
A subscription descriptor for one stream key in the file.
FileSubscriber
A subscription to one stream key in the file; yields SeaMessages.
SeaMessage
A message delivered by one of this crate’s subscribers.
StdioBroker
Standard input and output as one stream: consume lines from stdin, publish lines to stdout, in the client’s [timestamp | stream_key | seq] payload line format.
StdioPublish
The publish policy for StdioPublisher.
StdioPublisher
Publishes messages to standard output.
StdioSubscriber
A subscription to one stream key on standard input; yields SeaMessages.

Enums§

FilePosition
A position in a stream file’s retained log, accepted by Seeker::seek.
SeaFileError
Errors returned by the file and stdio transports.

Constants§

SEQUENCE_HEADER
Header exposing the message’s sequence number within its stream.