Documentation
¶
Overview ¶
Package requestlog retains request occurrences and projects request status read models.
Index ¶
Constants ¶
const ( // MetadataKeyBuildID identifies the build associated with a request event. MetadataKeyBuildID = "build_id" // MetadataKeyFactDegree records the degree established by a validation fact. MetadataKeyFactDegree = "fact_degree" // MetadataKeyProjectFactCount records how many project facts a completed batch established. MetadataKeyProjectFactCount = "project_fact_count" // MetadataKeyBrokenProjectFactCount records how many persisted project facts have a nonzero degree. MetadataKeyBrokenProjectFactCount = "broken_project_fact_count" // MetadataKeyBaseURI records the selected build baseline; an empty value means a full build. MetadataKeyBaseURI = "base_uri" // MetadataKeyIssueCount records the issue count at the first retained analysis completion. MetadataKeyIssueCount = "issue_count" // MetadataKeyClosureMode records whether absent issues were reconciled or why closure was suppressed. MetadataKeyClosureMode = "closure_mode" // MetadataKeyFixID identifies an opaque repair attempt. MetadataKeyFixID = "fix_id" // MetadataKeyExecutorID identifies the queue-local registered repair backend. MetadataKeyExecutorID = "executor_id" // MetadataKeyTaskID identifies the validation task associated with a repair attempt. MetadataKeyTaskID = "task_id" // MetadataKeyUnitID identifies the validation unit; empty means a task-wide issue. MetadataKeyUnitID = "unit_id" // MetadataKeyReason is a bounded explanation for a skipped or abandoned operation. MetadataKeyReason = "reason" )
Variables ¶
This section is empty.
Functions ¶
func NewRequestEventLog ¶
func NewRequestEventLog( request entity.Request, event entity.RequestEvent, occurrence string, metadata map[string]string, ) entity.RequestLog
NewRequestEventLog constructs a stable occurrence for a durable request lifecycle event.
func NewRequestStateLog ¶
func NewRequestStateLog(request entity.Request, outcomeReason entity.RequestOutcomeReason) entity.RequestLog
NewRequestStateLog constructs the occurrence representing the request's current durable state.
Types ¶
type Materializer ¶
type Materializer interface {
// PersistLog retains one occurrence idempotently and updates projections derived from it.
PersistLog(context.Context, storage.Storage, entity.RequestLog) error
}
Materializer retains request-log occurrences and advances their derived read models.
func NewMaterializer ¶
func NewMaterializer(scope tally.Scope) Materializer
NewMaterializer creates a request-log materializer.