Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Timestamp time.Time `json:"timestamp"`
Code string `json:"code"`
Boundary string `json:"boundary"`
Mode string `json:"mode"`
Outcome Outcome `json:"outcome"`
Details string `json:"details,omitempty"`
}
Event captures a structured enforcement signal.
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
Recorder builds the enforcement metadata stream.
func NewRecorder ¶
NewRecorder creates a recorder initialized with the given mode.
func (*Recorder) Metadata ¶
func (r *Recorder) Metadata() RunMetadata
Metadata returns a snapshot of the enforcement metadata.
func (*Recorder) RecordClaimedSuccess ¶
func (r *Recorder) RecordClaimedSuccess()
RecordClaimedSuccess increments the claimed success counter.
func (*Recorder) RecordEnforcedSuccess ¶
func (r *Recorder) RecordEnforcedSuccess()
RecordEnforcedSuccess increments the enforced success counter independently.
func (*Recorder) RecordEvent ¶
RecordEvent appends a structured enforcement signal and updates counters.
type RunMetadata ¶
type RunMetadata struct {
ExecutionMode string `json:"execution_mode"`
EnforcementEvents []Event `json:"enforcement_events"`
AllowedActionsCount int `json:"allowed_actions_count"`
BlockedActionsCount int `json:"blocked_actions_count"`
ViolationsCount int `json:"violations_count"`
ClaimedSuccessCount int `json:"claimed_success_count"`
EnforcedSuccessCount int `json:"enforced_success_count"`
}
RunMetadata exposes the enforcement contract for an execution run.
Click to show internal directories.
Click to hide internal directories.