{"modulePath":"github.com/viant/datly","version":"v1.1.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package engine\n\nPackage engine owns the common invocation path shared by runtime handler flavors: one Bindly scope, one input plan, and one lifecycle.\n\n## Variables\n\n```go\nvar ErrSequenceStrategyConflict = errors.New(\"component sequence strategy conflicts with the root database unit\")\n```\n\n```go\nvar ErrTransactionConflict = errors.New(\"component transaction conflicts with the root database unit\")\n```\n\n```go\nvar ErrUnknownDatabaseIdentity = errors.New(\"nested component database identity is unknown\")\n```\n\n## Functions\n\n```go\nfunc ComposeScope(parent dexec.ProviderScope, child ...locator.Provider) (dexec.ProviderScope, error)\n```\nComposeScope makes explicit child providers the per-name authority over an inherited protocol scope. The result can be inherited by deeper invocations.\n\n```go\nfunc IsImperativeComponent(ctx context.Context) bool\n```\nIsImperativeComponent 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.\n\n```go\nfunc PrepareComponent(ctx context.Context, relation ComponentRelation, order string) context.Context\n```\nPrepareComponent marks the relationship consumed by the next nested engine invocation. The marker remains internal to Datly's dispatcher flow.\n\n## Types\n\n```go\ntype ComponentRelation string\n```\n\n```go\nconst (\n\tComponentBinding    ComponentRelation = \"binding\"\n\tComponentImperative ComponentRelation = \"imperative\"\n)\n```\n\n```go\ntype Engine struct{}\n```\n\n```go\nfunc New() *Engine\n```\n\n```go\nfunc (e *Engine) Execute(ctx context.Context, request Request) (actual any, failure error)\n```\n\n```go\ntype FinalizationError struct {\n\tRoute   string\n\tOutcome xhandler.Outcome\n\tErr     error\n}\n```\nFinalizationError distinguishes post-completion work from a failed database transaction. Outcome retains the actual commit/rollback evidence.\n\n```go\nfunc (e *FinalizationError) Error() string\n```\n\n```go\nfunc (e *FinalizationError) Unwrap() error\n```\n\n```go\ntype Request struct {\n\t// SequenceStrategy is canonical component metadata, not a client-bound value.\n\tSequenceStrategy string\n\tOutputType       reflect.Type\n\tInjector         *bindly.Injector\n\tInput            *registry.RouteInputContract\n\tBoundInput       any\n\tReplay           *bindly.ReplayBinding\n\tBindingOutput    any\n\tInjectors        func(context.Context, any, xhandler.Route) (xhandler.Binder, error)\n\tScope            dexec.ProviderScope\n\tCapabilities     rhandler.InvocationCapabilities\n\tProviders        []locator.Provider\n\t// Constants is runtime-derived canonical constant authority. It remains\n\t// separate from caller-controlled providers so authority cannot be forged.\n\tConstants locator.Provider\n\t// Components is runtime-owned route authority and cannot be shadowed by\n\t// component-registered or protocol-scoped providers.\n\tComponents locator.Provider\n\t// ComponentInvoker is runtime-owned exact component invocation authority.\n\tComponentInvoker locator.Provider\n\tDataSource       dexec.DataSource\n\tHandler          rhandler.Handler\n\tCompletion       func(xhandler.Outcome)\n}\n```\n\n","path":"github.com/viant/datly/runtime/handler/engine","name":"engine","synopsis":"Package engine owns the common invocation path shared by runtime handler flavors: one Bindly scope, one input plan, and one lifecycle.","isRedistributable":true}
