@event-driven-platform/read-handler-resolver
v0.0.3
Published
ReadHandler resolution contracts for the event-driven platform read pipeline.
Readme
@event-driven-platform/read-handler-resolver
Defines the typed handler-resolution boundary for the stable Read pipeline.
Role
ReadHandlerResolver maps a Read to an explicit resolution outcome:
resolvedwith one or more typed handlers in deterministic order;not-foundwhen no handler set exists;ambiguouswhen resolution cannot safely choose a deterministic handler set.
import type {
ReadHandlerResolution,
ReadHandlerResolver,
} from '@event-driven-platform/read-handler-resolver';
class AppReadHandlerResolver implements ReadHandlerResolver {
public resolve<TRead extends AnyRead>(
read: TRead,
): ReadHandlerResolution<TRead> {
// Application-specific lookup/registration belongs here.
}
}The package intentionally does not prescribe a registry or dependency-injection mechanism. Applications may implement resolution in the form that fits their composition model while preserving the explicit outcome contract.
Public API
ReadHandlerResolverReadHandlerResolution
Architectural boundary
Resolver performs lookup/composition only. It does not execute handlers, traverse or populate caches, coordinate in-flight work, or implement Reader behavior.
A resolution may contain multiple ordered handlers, but the current Reader/source contract executes the first resolved handler; ReadHandler itself has no cache-like miss outcome and handlers are not treated as source fallbacks.
