Documentation
¶
Overview ¶
Package envelope provides the common execution envelope for storage operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config[P shared.Param] struct { Storage storage.IStorage Adapter string Status string ID string Target string HookData any // ResolveTarget, when set, computes the target after params are merged and // before the hooks run — inside the span, so a resolution failure is traced // like any other. Its result replaces Target for both hooks and is passed to // the body. // // It exists because the adapters differ on this: some have a fixed target, // while the SQL adapters derive one from the caller's argument and their own // configured default via shared.TargetName. Resolving before Run would move // the failure outside the span, and resolving inside body would run the // pre-hook too early and hand it an unresolved target. Both are behaviour // changes, so the resolution point has to sit here. ResolveTarget func() (string, error) Param *P Options []storage.Func[*P] NewParams func() (*P, error) RequiresID bool SuccessCounter *expvar.Int FailureCounter *expvar.Int }
Config contains the operation-specific inputs to Run.
Click to show internal directories.
Click to hide internal directories.