Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PathToOpRE = regexp.MustCompile(`OPS/(?P<stack>(?:\$boot)|(?:\$service(?:\/\$slot)*)).*?/?(?P<scope>\d+)\D*\/(?P<file>(?:resonator.txcl))$`)
Functions ¶
func MetaFromContext ¶
MetaFromContext returns the meta string set by WithMeta, or "" if none was attached. Empty return is safe to gjson.Get against.
Types ¶
type Operation ¶
type Operation struct {
Input string `json:"input,omitempty"`
Output string `json:"output,omitempty"`
Service string `json:"service,omitempty"`
Slot string `json:"slot,omitempty"`
Stack string `json:"stack,omitempty"`
Scope int `json:"scope,omitempty"`
Name string `json:"name,omitempty"` // filename-derived identity within (stack, scope); empty for legacy rules
Txcl string `json:"txcl,omitempty"`
MockRes string `json:"mockRes,omitempty"`
MockReq string `json:"mockReq,omitempty"`
Resonator *resonator.Resonator
Meta string `json:"meta,omitempty"`
OpID string `json:"opId,omitempty"` // unique ID for this Operation
// Secrets holds materialized secret cleartext for this op
// instance. The field is tagged `json:"-"` AND its type's
// MarshalJSON / MarshalText / GobEncode all panic, so cleartext
// cannot reach any envelope, trace, log, mock, or continuation
// by construction (internal docs/todo-secret-store.md §4.1).
//
// Populated by the processor (PR 3) between WHEN/SET/SELECT/WITH
// decoration and Exec; zeroed via defer on every exit path. Read
// directly by secret-aware op handlers as op.Secrets.Get(NAME);
// handlers never call the Resolver or Store themselves.
Secrets secrets.SecretBag `json:"-"`
}
func PathToOperation ¶
func (*Operation) Copy ¶
Copy Create a shallow copy of the Operation, forcing a new OpID.
Secrets bag is shared by reference (SecretBag's internal map is not deep-copied). Copy() is called within a single request scope to spawn a new execution instance; the copy and the original both see the same materialized cleartext, and the processor's deferred Zero() wipes both views in one call. Sharing is correct here.
Click to show internal directories.
Click to hide internal directories.