{"modulePath":"github.com/uber/submitqueue","version":"v0.3.0-20261204225004-ef0e72fca7fb","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package requestlog\n\nPackage requestlog retains request occurrences and projects request status read models.\n\n## Constants\n\n```go\nconst (\n\n\t// MetadataKeyBuildID identifies the build associated with a request event.\n\tMetadataKeyBuildID = \"build_id\"\n\t// MetadataKeyFactDegree records the degree established by a validation fact.\n\tMetadataKeyFactDegree = \"fact_degree\"\n\t// MetadataKeyProjectFactCount records how many project facts a completed batch established.\n\tMetadataKeyProjectFactCount = \"project_fact_count\"\n\t// MetadataKeyBrokenProjectFactCount records how many persisted project facts have a nonzero degree.\n\tMetadataKeyBrokenProjectFactCount = \"broken_project_fact_count\"\n\t// MetadataKeyBaseURI records the selected build baseline; an empty value means a full build.\n\tMetadataKeyBaseURI = \"base_uri\"\n\t// MetadataKeyIssueCount records the issue count at the first retained analysis completion.\n\tMetadataKeyIssueCount = \"issue_count\"\n\t// MetadataKeyValidationComplete confirms usable outcomes for all required validation work.\n\t// Missing or non-true values do not establish coverage.\n\tMetadataKeyValidationComplete = \"validation_complete\"\n\t// MetadataKeyClosureMode records whether absent issues were reconciled or why closure was suppressed.\n\tMetadataKeyClosureMode = \"closure_mode\"\n\t// MetadataKeyFixID identifies an opaque repair attempt.\n\tMetadataKeyFixID = \"fix_id\"\n\t// MetadataKeyExecutorID identifies the queue-local registered repair backend.\n\tMetadataKeyExecutorID = \"executor_id\"\n\t// MetadataKeyChangeURL identifies the verified change for an availability event.\n\tMetadataKeyChangeURL = \"change_url\"\n\t// MetadataKeyChangeReused indicates the executor identified an existing change.\n\tMetadataKeyChangeReused = \"change_reused\"\n\t// MetadataKeyTaskID identifies the validation task associated with a repair attempt.\n\tMetadataKeyTaskID = \"task_id\"\n\t// MetadataKeyUnitID identifies the validation unit; empty means a task-wide issue.\n\tMetadataKeyUnitID = \"unit_id\"\n\t// MetadataKeyReason is a bounded explanation for a skipped or abandoned operation.\n\tMetadataKeyReason = \"reason\"\n)\n```\n\n## Functions\n\n```go\nfunc NewRequestEventLog(\n\trequest entity.Request,\n\tevent entity.RequestEvent,\n\toccurrence string,\n\tmetadata map[string]string,\n) entity.RequestLog\n```\nNewRequestEventLog constructs a stable occurrence for a durable request lifecycle event.\n\n```go\nfunc NewRequestStateLog(request entity.Request, fallbackReason entity.RequestOutcomeReason) entity.RequestLog\n```\nNewRequestStateLog constructs the occurrence representing the request's current durable state. It records the request's persisted outcome reason. fallbackReason applies only when none is persisted: on a nonterminal request, or on one made terminal before reasons were persisted.\n\n## Types\n\n```go\ntype Materializer interface {\n\t// PersistLog retains one occurrence idempotently and updates projections derived from it.\n\tPersistLog(context.Context, storage.Storage, entity.RequestLog) error\n}\n```\nMaterializer retains request-log occurrences and advances their derived read models.\n\n```go\nfunc NewMaterializer(scope tally.Scope) Materializer\n```\nNewMaterializer creates a request-log materializer.\n\n","path":"github.com/uber/submitqueue/stovepipe/core/requestlog","name":"requestlog","synopsis":"Package requestlog retains request occurrences and projects request status read models.","isRedistributable":true}
