Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions temporalio/contrib/streams/nexus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@
:meth:`temporalio.contrib.streams.StreamStorePlugin.close_stream` completes
the operation, or :func:`temporalio.contrib.streams.close_workflow_stream`
from the owning Workflow.

A caller Workflow reads such a stream with :class:`StreamReader`: it waits on
the operation's progress and reads through this service. By default it reads
in a Local Activity through a :class:`StreamDirectTransport` that
:class:`StreamDirectReads` maps the endpoint to, and History keeps only each
read's range and digest. With ``replay_from_store=False`` each read is a
Nexus operation of the Workflow, so History records each batch and a replay
hands over the same batches with no store at hand. That works on any server,
Temporal Cloud included.
:class:`ClientTransport` calls ``ExecuteSyncNexusOperation`` with the
caller's own client, and :class:`HttpTransport` the HTTP ingress of a
self-hosted server.
"""

from temporalio.contrib.streams import StreamRef
Expand All @@ -64,17 +76,29 @@
StreamOperationHandler,
stream_ref_from_token,
)
from temporalio.contrib.streams.nexus._reader import (
ReadPosition,
ReadStaleRecord,
ReadSupersession,
StreamIncompleteError,
StreamReader,
)

__all__ = [
"AppendInput",
"AppendOutput",
"HTTPStatusError",
"ReadInput",
"ReadOutput",
"ReadStaleRecord",
"ReadPosition",
"ReadSupersession",
"RecordWire",
"StreamAccess",
"StreamCursor",
"StreamIncompleteError",
"StreamOperationHandler",
"StreamReader",
"StreamRef",
"TemporalStreams",
"TemporalStreamsHandler",
Expand Down
Loading
Loading