Documentation
¶
Overview ¶
Package embedded provides a small checked-runtime facade for Go applications.
The default stores are process-local. Use effectusd when executions must survive application or host restarts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Permanent ¶
func Permanent(err error) invocation.Outcome
Permanent returns a permanent business failure.
func Retryable ¶
func Retryable(err error) invocation.Outcome
Retryable returns a known-not-committed retryable outcome.
func Success ¶
func Success(result any) invocation.Outcome
Success returns a successful business outcome.
func Unknown ¶
func Unknown(err error) invocation.Outcome
Unknown returns an outcome whose commit state is not known.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder collects checked sources, fact declarations, and business verbs.
func (*Builder) AddFact ¶
AddFact declares a fact path and a representative value for type checking.
type HandlerFunc ¶
type HandlerFunc func(context.Context, invocation.Request) invocation.Outcome
HandlerFunc executes one checked verb with Effectus invocation metadata.
type Request ¶
type Request struct {
Namespace string
IdempotencyKey string
Facts map[string]any
WaitMode effectusruntime.WaitMode
}
Request is one embedded execution admission.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime owns one checked embedded generation.
func (*Runtime) Execute ¶
func (runtime *Runtime) Execute(ctx context.Context, request Request) (effectusruntime.ExecuteResult, error)
Execute admits or replays one request through runtime.Engine.