Documentation
¶
Overview ¶
Package millivolt exposes the release identity shared by every build path.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareVersions ¶ added in v0.3.30
CompareVersions compares two validated release versions using SemVer 2.0.0 precedence. It returns -1 when a sorts before b, 0 when they are equal, and 1 when a sorts after b. Build metadata is not accepted.
func ValidateRevision ¶
ValidateRevision accepts a full lowercase Git SHA-1 or SHA-256 object ID.
func ValidateVersion ¶
ValidateVersion enforces the release naming policy, including numeric prerelease identifiers without leading zeroes. It accepts no whitespace, leading v, or build metadata suffix.
Types ¶
type BuildInfo ¶
type BuildInfo struct {
Version string `json:"version"`
Revision string `json:"revision"`
Modified *bool `json:"modified"`
GoVersion string `json:"go_version"`
}
BuildInfo identifies the running binary. A nil Modified means the source tree's cleanliness is unknown, not clean. Revision is "unknown" when absent.
func CurrentBuild ¶
CurrentBuild reads the standard Go build metadata. No subprocess, filesystem scan, clock stamp, configuration load, or network access is needed.
type ReleaseInfo ¶
ReleaseInfo is validated metadata for the container/release workflow. Tag is optional for default-branch builds; when present it must match VERSION exactly.
func ReleaseMetadata ¶
func ReleaseMetadata(tag, revision string) (ReleaseInfo, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
proxy
command
|
|
|
release
command
Command release validates release metadata and writes GitHub output lines.
|
Command release validates release metadata and writes GitHub output lines. |
|
stress
command
stress measures the real, isolated dev proxy against an in-process local upstream.
|
stress measures the real, isolated dev proxy against an in-process local upstream. |
|
internal
|
|
|
adminjson
Package adminjson owns the JSON trust boundary for operator mutations.
|
Package adminjson owns the JSON trust boundary for operator mutations. |
|
backup
Package backup is the single owner of millivolt operator backup archives.
|
Package backup is the single owner of millivolt operator backup archives. |
|
format
Package format implements the wire codecs for the supported client and upstream protocols and translates between them through the canonical IR.
|
Package format implements the wire codecs for the supported client and upstream protocols and translates between them through the canonical IR. |
|
format/ir
Package ir defines the protocol-neutral request, response and streaming event model that every wire codec translates through.
|
Package ir defines the protocol-neutral request, response and streaming event model that every wire codec translates through. |
|
jsonnum
Package jsonnum owns exact decoding of JSON number literals that must be integers.
|
Package jsonnum owns exact decoding of JSON number literals that must be integers. |
|
mcp
Package mcp wraps millivolt's operator and observability HTTP surface as an MCP server, so an LLM can run analytical queries against a running proxy and drive its safe operator controls.
|
Package mcp wraps millivolt's operator and observability HTTP surface as an MCP server, so an LLM can run analytical queries against a running proxy and drive its safe operator controls. |
|
scheduler
Package scheduler provides a provider-agnostic, FIFO-ordered request queue with per-group concurrency caps and adaptive rate-limit pacing.
|
Package scheduler provides a provider-agnostic, FIFO-ordered request queue with per-group concurrency caps and adaptive rate-limit pacing. |
|
sse
Package sse provides minimal, allocation-conscious parsers for extracting metrics from OpenAI-compatible SSE chat completion streams, plus the client-facing frame primitives and completion envelopes (frames.go, envelope.go) the proxy and its format bridges render through.
|
Package sse provides minimal, allocation-conscious parsers for extracting metrics from OpenAI-compatible SSE chat completion streams, plus the client-facing frame primitives and completion envelopes (frames.go, envelope.go) the proxy and its format bridges render through. |
|
storage
Package storage provides durable per-request storage using an embedded SQLite database.
|
Package storage provides durable per-request storage using an embedded SQLite database. |
|
web
Package web serves the embedded metrics dashboard.
|
Package web serves the embedded metrics dashboard. |
|
scripts
|
|
|
licenses
command
Command licenses bundles the notices from the exact target binary dependency graph.
|
Command licenses bundles the notices from the exact target binary dependency graph. |
|
tests
|
|
|
_go/cmd/proxy
command
|
|
|
_go/cmd/release
command
|
|
|
_go/cmd/stress
command
|
|
|
_go/scripts/licenses
command
|
|
|
_go/tests/containercheck
command
|
|
|
containercheck
command
Command containercheck owns only disposable, network-isolated Docker fixtures.
|
Command containercheck owns only disposable, network-isolated Docker fixtures. |
