def register

bendvy-ecs-core@0.1.0.4 · ordinary_app_event_family_reader.bend:54

import bendvy-ecs-core@0.1.0.4/ordinary_app_event_family_reader.bend as OrdinaryAppEventFamilyReader
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/system.bend as Sys
import bendvy-ecs-core@0.1.0.4/event_runtime.bend as Ev
import bendvy-ecs-core@0.1.0.4/event_stream.bend as Stream
import bendvy-ecs-core@0.1.0.4/event_family_routing.bend as Route

54# Register a reader against the stream selected by the closed take/put route.
55# Derives read authority from that stream's operational declaration and uses the
56# ordinary Registry registration rules. It allocates a reader identity without
57# delivering events. Refusal, including exhausted reader IDs or failed Registry
58# registration, returns RegistrationFailed with the returned runtime.
59# The runner receives event-runtime.Input{values, lagged, args}. This entry is
60# for Data streams; affine payload publication/reading uses the separate
61# ordinary-owned-event-* APIs. Qualified family setup and retention/refusal
62# scenarios are linked from docs/parity/typed-data-events.md.
63def register(~S:Data,~C:Type,~R:Type,~P:Data,~E:Data,~F:Type,~A:Type,~Error:Data,~Out:Type,~take:F -> F & Stream.Stream<S,E>,~put:F -> Stream.Stream<S,E> -> F,~runner:W.World<S,C,R,P> -> Ev.Input<E,A> -> Sys.Outcome<W.World<S,C,R,P>,Error,Out>,runtime:Route.Runtime<S,C,R,P,F>,name:String) -> Registration<S,C,R,P,E,F,A,Error,Out,take,put,runner>:
64  match runtime:
65    case Route.Runtime{world,family,tick}:taken(~S,~C,~R,~P,~E,~F,~A,~Error,~Out,~take,~put,~runner,world,tick,name,take(family))

Uses (9)

Used by (1)