Documentation
¶
Overview ¶
Package engine owns the common invocation path shared by runtime handler flavors: one Bindly scope, one input plan, and one lifecycle.
Index ¶
- Variables
- func ComposeScope(parent dexec.ProviderScope, child ...locator.Provider) (dexec.ProviderScope, error)
- func IsImperativeComponent(ctx context.Context) bool
- func PrepareComponent(ctx context.Context, relation ComponentRelation, order string) context.Context
- type ComponentRelation
- type Engine
- type FinalizationError
- type Request
Constants ¶
This section is empty.
Variables ¶
var ErrSequenceStrategyConflict = errors.New("component sequence strategy conflicts with the root database unit")
var ErrTransactionConflict = errors.New("component transaction conflicts with the root database unit")
var ErrUnknownDatabaseIdentity = errors.New("nested component database identity is unknown")
Functions ¶
func ComposeScope ¶
func ComposeScope(parent dexec.ProviderScope, child ...locator.Provider) (dexec.ProviderScope, error)
ComposeScope makes explicit child providers the per-name authority over an inherited protocol scope. The result can be inherited by deeper invocations.
func IsImperativeComponent ¶ added in v1.1.0
IsImperativeComponent reports whether this handler was invoked as an explicit child call. A child writer may flush its own buffered prefix so later sibling readers observe it inside the root-owned transaction.
func PrepareComponent ¶
func PrepareComponent(ctx context.Context, relation ComponentRelation, order string) context.Context
PrepareComponent marks the relationship consumed by the next nested engine invocation. The marker remains internal to Datly's dispatcher flow.
Types ¶
type ComponentRelation ¶
type ComponentRelation string
const ( ComponentBinding ComponentRelation = "binding" ComponentImperative ComponentRelation = "imperative" )
type FinalizationError ¶
FinalizationError distinguishes post-completion work from a failed database transaction. Outcome retains the actual commit/rollback evidence.
func (*FinalizationError) Error ¶
func (e *FinalizationError) Error() string
func (*FinalizationError) Unwrap ¶
func (e *FinalizationError) Unwrap() error
type Request ¶
type Request struct {
// SequenceStrategy is canonical component metadata, not a client-bound value.
SequenceStrategy string
OutputType reflect.Type
Injector *bindly.Injector
Input *registry.RouteInputContract
BoundInput any
Replay *bindly.ReplayBinding
BindingOutput any
Injectors func(context.Context, any, xhandler.Route) (xhandler.Binder, error)
Scope dexec.ProviderScope
Capabilities rhandler.InvocationCapabilities
Providers []locator.Provider
// Constants is runtime-derived canonical constant authority. It remains
// separate from caller-controlled providers so authority cannot be forged.
Constants locator.Provider
// Components is runtime-owned route authority and cannot be shadowed by
// component-registered or protocol-scoped providers.
Components locator.Provider
// ComponentInvoker is runtime-owned exact component invocation authority.
ComponentInvoker locator.Provider
DataSource dexec.DataSource
Handler rhandler.Handler
Completion func(xhandler.Outcome)
}