Versions in this module Expand all Collapse all v1 v1.6.5 Sep 3, 2026 v1.6.4 Aug 26, 2026 Changes in this version + type Change struct + Entity *registry.Entity + Envelope event.Envelope + Op Op + type Command struct + AggID string + Entity string + ExpectedVersion *int64 + Op Op + Payload any + SkipTypeCheck bool + type Executor struct + func NewExecutor(reg *registry.Registry, store Store, opts ...ExecutorOption) (*Executor, error) + func (x *Executor) Exec(ctx context.Context, cmd Command) (Result, error) + func (x *Executor) ExecBatch(ctx context.Context, cmds []Command) ([]Result, error) + type ExecutorOption func(*Executor) + func WithClock(now func() time.Time) ExecutorOption + func WithHooks(hooks ...LifecycleHook) ExecutorOption + func WithPostCommitHooks(hooks ...PostCommitHook) ExecutorOption + func WithTraceparent(fn func(context.Context) string) ExecutorOption + type HookFunc func(ctx context.Context, tx Tx, change Change) error + func (f HookFunc) OnChange(ctx context.Context, tx Tx, change Change) error + type LifecycleHook interface + OnChange func(ctx context.Context, tx Tx, change Change) error + type Op int + const OpCreate + const OpDelete + const OpUpdate + const OpUpsert + func (o Op) Verb() string + type PostCommitFunc func(ctx context.Context, changes []Change) + func (f PostCommitFunc) AfterCommit(ctx context.Context, changes []Change) + type PostCommitHook interface + AfterCommit func(ctx context.Context, changes []Change) + type Result struct + AggID string + EventID string + Version int64 + type Store interface + InTenantTx func(ctx context.Context, fn func(ctx context.Context, tx Tx) error) error + type Tx interface + AppendOutbox func(ctx context.Context, env event.Envelope) error + ApplyChange func(ctx context.Context, ent *registry.Entity, op Op, aggID string, version int64, ...) error + CurrentVersion func(ctx context.Context, ent *registry.Entity, aggID string) (int64, error) + Exec func(ctx context.Context, sql string, args ...any) error Other modules containing this package github.com/xraph/fabriq