entity

package
v0.2.0-dev.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func RequestFromBytes(data []byte) (Request, error)

RequestFromBytes deserializes a Request from JSON bytes.

func (Request) ToBytes

func (r Request) ToBytes() ([]byte, error)

ToBytes serializes the Request to JSON bytes for queue message payload.

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

func RequestIDFromBytes(data []byte) (RequestID, error)

RequestIDFromBytes deserializes a RequestID from JSON bytes.

func (RequestID) ToBytes

func (r RequestID) ToBytes() ([]byte, error)

ToBytes serializes the RequestID to JSON bytes for queue message payload.

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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL