Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct {
// ID is the globally unique identifier for the request. Format: "request/<queue>/<counter>"
// (e.g. "request/monorepo/main/42").
ID string `json:"id"`
// Queue is the name of the queue (a named repo+ref) being validated. It namespaces the ID
// and is the stable handle the ingest caller supplies.
Queue string `json:"queue"`
// URI is the opaque, VCS-agnostic locator of the commit under validation, as produced by the
// SourceControl extension. It is empty until SourceControl resolution is wired in.
URI string `json:"uri"`
// State is the current state of the request in the pipeline.
State RequestState `json:"state"`
// Version is the version of the object. It is used for optimistic locking.
// Versioning starts at 1 and is incremented for each change to the object.
Version int32 `json:"version"`
}
Request represents a single validation of a queue at a particular commit. The queue reports a newly observed commit, Stovepipe mints a Request (identity namespaced by the queue), and the request flows through the pipeline accumulating state.
func RequestFromBytes ¶
RequestFromBytes deserializes a Request from JSON bytes.
type RequestID ¶
type RequestID struct {
// ID is the globally unique identifier for the request.
ID string `json:"id"`
}
RequestID is a lightweight entity for publishing and consuming just the request identifier via the queue.
func RequestIDFromBytes ¶
RequestIDFromBytes deserializes a RequestID from JSON bytes.
type RequestState ¶
type RequestState string
RequestState defines the internal state of a Stovepipe validation request as it moves through the pipeline. States are internal and used to implement a state machine; a customer-facing status type may be layered on top later, as in SubmitQueue.
const ( // RequestStateUnknown is the unreachable zero value. It is set by default when the // structure is initialized and should never be seen in the system. RequestStateUnknown RequestState = "" // RequestStateAccepted is the initial state of a request: a new commit has been observed // for the queue and the request has been admitted into the pipeline, but no validation // strategy has been chosen yet. Later stages (process, build, record) add their own states. RequestStateAccepted RequestState = "accepted" )