{"modulePath":"github.com/uber/submitqueue","version":"v0.3.0-20261201002059-b9cf5c6459fe","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package record\n\nPackage record holds the record-stage queue controller. It consumes Record messages (a request id) published after project analysis or cancellation, and turns that outcome into durable repository validation state.\n\nThe durable state is a repository ValidationFact per validated commit. Build completion owns the queue's last-green bookmark, which process reads to choose an incremental build baseline. A green commit is also promoted after its facts are persisted, moving the queue's promotion ref so downstream systems can pull the latest green commit by name.\n\nThe outcome is then announced as a hook event, so integrations outside the pipeline learn that a commit is green or broken. See doc/rfc/stovepipe/steps/record.md for the event shape and doc/rfc/hook-framework.md for the delivery promise.\n\n## Types\n\n```go\ntype Controller struct {\n\t// contains filtered or unexported fields\n}\n```\nController consumes Record messages, records the build's validation fact, and when that fact is green and holds the queue's last-green bookmark promotes the commit. Implements consumer.Controller.\n\n```go\nfunc NewController(\n\tlogger *zap.SugaredLogger,\n\tscope tally.Scope,\n\tstores storage.Factory,\n\tmaterializer requestlog.Materializer,\n\tsourceControl sourcecontrol.Factory,\n\tregistry consumer.TopicRegistry,\n\ttopicKey consumer.TopicKey,\n\tconsumerGroup string,\n) *Controller\n```\nNewController creates a new record controller.\n\n```go\nfunc (c *Controller) ConsumerGroup() string\n```\nConsumerGroup returns the consumer group for offset tracking.\n\n```go\nfunc (c *Controller) Name() string\n```\nName returns the controller name for logging and metrics.\n\n```go\nfunc (c *Controller) Process(ctx context.Context, delivery consumer.Delivery) error\n```\nProcess loads the request referenced by the delivery, records its validation fact, applies that fact to the caches derived from it, and announces the outcome as a hook event. Returns nil to ack (success) or an error to nack (retry) / reject (DLQ).\n\nbuildsignal stamps the outcome on the request before publishing here, so a request without a build outcome is a producer invariant violation rather than a state this stage waits for.\n\n```go\nfunc (c *Controller) TopicKey() consumer.TopicKey\n```\nTopicKey returns the topic key this controller subscribes to.\n\n```go\ntype DLQController struct {\n\t// contains filtered or unexported fields\n}\n```\nDLQController retains abandoned record work and ensures failed requests have a repository fact without requiring project attribution.\n\n```go\nfunc NewDLQController(\n\tlogger *zap.SugaredLogger,\n\tscope tally.Scope,\n\tstores storage.Factory,\n\tmaterializer requestlog.Materializer,\n\tregistry consumer.TopicRegistry,\n\ttopicKey consumer.TopicKey,\n\tconsumerGroup string,\n) *DLQController\n```\nNewDLQController creates a controller for abandoned record work.\n\n```go\nfunc (c *DLQController) ConsumerGroup() string\n```\nConsumerGroup returns the controller's consumer group.\n\n```go\nfunc (c *DLQController) Name() string\n```\nName returns the controller's name.\n\n```go\nfunc (c *DLQController) Process(ctx context.Context, delivery consumer.Delivery) error\n```\nProcess retains an observable abandonment occurrence for record work that the primary consumer could not finish. Deterministic poison is acknowledged; failures recording facts, retaining history, or publishing are retried.\n\n```go\nfunc (c *DLQController) TopicKey() consumer.TopicKey\n```\nTopicKey returns the controller's topic key.\n\n","path":"github.com/uber/submitqueue/stovepipe/controller/record","name":"record","synopsis":"Package record holds the record-stage queue controller.","isRedistributable":true}
