Documentation
¶
Overview ¶
Package observerruntime owns ordered observer delivery and acknowledgement.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeContent ¶
func DecodeContent(descriptor events.Descriptor, ec events.Context, content []byte, generations map[events.Generation]json.RawMessage) (events.Context, any, error)
DecodeContent applies C#'s generation selection, falling back to Content when no requested representation is supplied. It never treats JSON null as an event.
Types ¶
type Reactor ¶
type Reactor struct {
// contains filtered or unexported fields
}
Reactor owns a single duplex stream. Run has one receiver and one sender with no application queue: transport backpressure bounds pending messages.
func Open ¶
func Open(ctx context.Context, conn grpc.ClientConnInterface, connectionID string, store metadata.StoreName, namespace metadata.Namespace, plan *reactors.Plan, runtime reactors.Runtime) (*Reactor, error)
Open sends the registration on an explicit generation lifetime. The protocol has no registration acknowledgement: success means sent, not kernel acceptance.
type Reducer ¶
type Reducer struct {
// OnChange receives successful local folds before kernel acknowledgement.
// Install before Run. It must not block or call user code.
OnChange func(string, json.RawMessage)
// contains filtered or unexported fields
}
Reducer is the reducer protocol adapter over the shared ordered stream loop.
func OpenReducer ¶
func OpenReducer(ctx context.Context, conn grpc.ClientConnInterface, connectionID string, store metadata.StoreName, namespace metadata.Namespace, plan *reducers.Plan) (*Reducer, error)
OpenReducer sends the immutable registration snapshot. Like reactors, the duplex protocol has no registration acknowledgement beyond a successful send.