Documentation
¶
Overview ¶
Package embedded executes one immutable source bundle in-process.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct {
Namespace string
IdempotencyKey string
Facts map[string]any
WaitMode runtime.WaitMode
}
Request identifies one logical operation. Keep Namespace and IdempotencyKey stable for retries. Facts must remain unchanged while Execute reads them. An empty WaitMode uses terminal waiting.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime owns one immutable generation and an Engine. Embedded execution is intentionally descriptor-based; Go callback executors are not supported.
func Open ¶ added in v0.4.0
func Open(ctx context.Context, source *bundle.SourceBundle, resolvers *invocation.Registry) (*Runtime, error)
Open compiles and resolves a source bundle once. Executable identity comes from the bundle. The runtime owns resources returned by resolvers, not the registry's resolver implementations. Its default ledger and outbox are in memory. It does not start a recovery worker.
func (*Runtime) Close ¶
Close drains entered calls and releases the owned engine and generation. Stop new callers first. Do not call Close from an executor using this runtime.
func (*Runtime) Engine ¶ added in v0.4.0
Engine returns the borrowed engine. Configure it before the first execution. The runtime retains ownership. Use Runtime.Close to end its lifetime.