Directories
¶
| Path | Synopsis |
|---|---|
|
Package agent defines the machine-readable "agent contract" that every fleet service can advertise so an AI agent (Claude, Codex, OpenCode, an MCP server, the catalog hub) can call it correctly without guessing the input shape, auth model, or output envelope.
|
Package agent defines the machine-readable "agent contract" that every fleet service can advertise so an AI agent (Claude, Codex, OpenCode, an MCP server, the catalog hub) can call it correctly without guessing the input shape, auth model, or output envelope. |
|
Package apikey is the canonical client for the fleet's keystore service (baditaflorin/go-apikey-service).
|
Package apikey is the canonical client for the fleet's keystore service (baditaflorin/go-apikey-service). |
|
Package backoffcoord is the fleet client for go-fleet-backoff-coordinator (ADR-0013).
|
Package backoffcoord is the fleet client for go-fleet-backoff-coordinator (ADR-0013). |
|
Package bootgate is an opt-in primitive for "do not start heavy boot-time work all at once": it spreads a service's first heavy cycle out in time and backs off while the host is overloaded.
|
Package bootgate is an opt-in primitive for "do not start heavy boot-time work all at once": it spreads a service's first heavy cycle out in time and backs off while the host is overloaded. |
|
Package botwall recognises the interstitial pages a bot-protection vendor answers a client it distrusts with: a captcha, a "checking your browser" wait, an "Access Denied" page.
|
Package botwall recognises the interstitial pages a bot-protection vendor answers a client it distrusts with: a captcha, a "checking your browser" wait, an "Access Denied" page. |
|
Package browserheaders generates a coherent set of browser-typical HTTP request headers for outbound calls that need to evade trivial bot detection.
|
Package browserheaders generates a coherent set of browser-typical HTTP request headers for outbound calls that need to evade trivial bot detection. |
|
Package cache provides a generic, concurrency-safe LRU+TTL cache.
|
Package cache provides a generic, concurrency-safe LRU+TTL cache. |
|
Package cgroup reads resource counters and limits for the current Linux cgroup.
|
Package cgroup reads resource counters and limits for the current Linux cgroup. |
|
Package chromeguard keeps a Chromium process tree from taking its container down: it reads per-process memory from /proc, raises the OOM score of the browser's children so the kernel kills a renderer first, kills a renderer that grew past a limit, tells the service when a whole browser grew past another, and derives how many browsers and tabs a container can afford from its cgroup limits.
|
Package chromeguard keeps a Chromium process tree from taking its container down: it reads per-process memory from /proc, raises the OOM score of the browser's children so the kernel kills a renderer first, kills a renderer that grew past a limit, tells the service when a whole browser grew past another, and derives how many browsers and tabs a container can afford from its cgroup limits. |
|
Package circuitbreaker is a small, in-process circuit-breaker that every safehttp consumer's degraded[]-fallback was hand-rolling.
|
Package circuitbreaker is a small, in-process circuit-breaker that every safehttp consumer's degraded[]-fallback was hand-rolling. |
|
Package client provides low-level HTTP client abstractions: capability negotiation, URL proxying helpers (JSProxy, FetchProxy), and network property extraction.
|
Package client provides low-level HTTP client abstractions: capability negotiation, URL proxying helpers (JSProxy, FetchProxy), and network property extraction. |
|
Package clock provides a Clock interface with a real implementation (backed by time.Now) and a controllable mock implementation for deterministic tests.
|
Package clock provides a Clock interface with a real implementation (backed by time.Now) and a controllable mock implementation for deterministic tests. |
|
Package compat says whether a go-common version is old enough to be missing a security fix that go-common itself shipped.
|
Package compat says whether a go-common version is old enough to be missing a security fix that go-common itself shipped. |
|
Package config loads service configuration from service.yaml and environment variables.
|
Package config loads service configuration from service.yaml and environment variables. |
|
Package credentiallease is a task-bound client for a credential broker.
|
Package credentiallease is a task-bound client for a credential broker. |
|
broker
Package broker provides the fail-closed HTTP core for credentiallease v1.
|
Package broker provides the fail-closed HTTP core for credentiallease v1. |
|
Package credfile reads a credential (an API key) from a file and keeps it current: a renewed key that is atomically written over the file is picked up without a restart, a callee's 401 triggers one immediate re-read, and a file that briefly goes missing leaves the last good value in use.
|
Package credfile reads a credential (an API key) from a file and keeps it current: a renewed key that is atomically written over the file is picked up without a restart, a callee's 401 triggers one immediate re-read, and a file that briefly goes missing leaves the last good value in use. |
|
Package dataformat provides bidirectional conversion primitives between the structured data formats commonly seen across the fleet: JSON, CSV, XML, YAML and TOML.
|
Package dataformat provides bidirectional conversion primitives between the structured data formats commonly seen across the fleet: JSON, CSV, XML, YAML and TOML. |
|
Package dbx is the common, context-aware database entry point for Go Common.
|
Package dbx is the common, context-aware database entry point for Go Common. |
|
Package degraded is the canonical "primitive X is not working right now" signal that every fleet service appends to a per-request slice and surfaces in its response envelope.
|
Package degraded is the canonical "primitive X is not working right now" signal that every fleet service appends to a per-request slice and surfaces in its response envelope. |
|
Package depcheck is the fleet's dependency-health registry.
|
Package depcheck is the fleet's dependency-health registry. |
|
Package deploymentauthorization defines the signed deployment-decision contract shared by the authority and fleet runner.
|
Package deploymentauthorization defines the signed deployment-decision contract shared by the authority and fleet runner. |
|
Package deploymentintent defines and validates the versioned deployment intent exchanged by fleet deployment control-plane components.
|
Package deploymentintent defines and validates the versioned deployment intent exchanged by fleet deployment control-plane components. |
|
Package deploymentlease is the shared fail-closed client for the Fleet Deployment Authority's mTLS authorization and target-lease API.
|
Package deploymentlease is the shared fail-closed client for the Fleet Deployment Authority's mTLS authorization and target-lease API. |
|
Package egress decides whether an outbound request goes through the environment's egress proxy (HTTP_PROXY / HTTPS_PROXY / NO_PROXY).
|
Package egress decides whether an outbound request goes through the environment's egress proxy (HTTP_PROXY / HTTPS_PROXY / NO_PROXY). |
|
Package egressproxy is a credential-injecting forward proxy that listens on loopback only, so a browser that cannot authenticate to an upstream proxy can still be forced through one.
|
Package egressproxy is a credential-injecting forward proxy that listens on loopback only, so a browser that cannot authenticate to an upstream proxy can still be forced through one. |
|
Package env provides typed, zero-dependency helpers for reading environment variables with defaults, required-or-fatal semantics, and common Go types (bool, int, duration, slice).
|
Package env provides typed, zero-dependency helpers for reading environment variables with defaults, required-or-fatal semantics, and common Go types (bool, int, duration, slice). |
|
Package errors defines a typed Error value that carries an HTTP status code, a stable machine-readable error code, a human message, and an optional cause.
|
Package errors defines a typed Error value that carries an HTTP status code, a stable machine-readable error code, a human message, and an optional cause. |
|
Package fleetfetch is the canonical caller-side client for go-infrastructure-fetch-cache.0exec.com — the fleet-wide HTTP fetch cache.
|
Package fleetfetch is the canonical caller-side client for go-infrastructure-fetch-cache.0exec.com — the fleet-wide HTTP fetch cache. |
|
Package graph instruments fleet-wide service-to-service calls and emits them to go-fleet-graph.
|
Package graph instruments fleet-wide service-to-service calls and emits them to go-fleet-graph. |
|
Package header defines canonical HTTP header name constants used across the fleet.
|
Package header defines canonical HTTP header name constants used across the fleet. |
|
internal
|
|
|
strictjson
Package strictjson decodes one JSON value while rejecting duplicate object keys, unknown struct fields, and trailing values.
|
Package strictjson decodes one JSON value while rejecting duplicate object keys, unknown struct fields, and trailing values. |
|
Package jsbundle recovers JavaScript source maps from minified bundles.
|
Package jsbundle recovers JavaScript source maps from minified bundles. |
|
Package ledger is the canonical client for the fleet's token ledger (baditaflorin/go-fleet-token-ledger, ADR-0033).
|
Package ledger is the canonical client for the fleet's token ledger (baditaflorin/go-fleet-token-ledger, ADR-0033). |
|
Package loadshed provides a non-blocking concurrency gate ("load shedder") for bounding the number of in-flight calls a service makes to a slow, saturatable shared upstream.
|
Package loadshed provides a non-blocking concurrency gate ("load shedder") for bounding the number of in-flight calls a service makes to a slow, saturatable shared upstream. |
|
Package logx is the fleet's structured logger: slog JSON on stdout, with the service, version and node on every line, the trace id when the call is inside a traced request, and credentials redacted before they are written.
|
Package logx is the fleet's structured logger: slog JSON on stdout, with the service, version and node on every line, the trace id when the call is inside a traced request, and credentials redacted before they are written. |
|
Package meshclient is the HTTP client for calls to sibling fleet services on the private mesh: a base URL, a timeout, a bounded and strictly decoded JSON body, and one explicit answer to the question every such call has to settle: if the sibling is down, does the caller go on without it, or stop?
|
Package meshclient is the HTTP client for calls to sibling fleet services on the private mesh: a base URL, a timeout, a bounded and strictly decoded JSON body, and one explicit answer to the question every such call has to settle: if the sibling is down, does the caller go on without it, or stop? |
|
Package meshresult is the fleet-wide canonical classification of an enricher's result, plus the HTTP-status mapping its consumer (domainscope) keys on.
|
Package meshresult is the fleet-wide canonical classification of an enricher's result, plus the HTTP-status mapping its consumer (domainscope) keys on. |
|
Package metrics provides a lightweight, in-process request statistics collector for JSON-served snapshots at /metrics/json.
|
Package metrics provides a lightweight, in-process request statistics collector for JSON-served snapshots at /metrics/json. |
|
Package middleware provides composable HTTP middleware for fleet services.
|
Package middleware provides composable HTTP middleware for fleet services. |
|
Package nullify is the canonical "I checked and found nothing" helper for enrichers writing a verdict/classification column to Postgres.
|
Package nullify is the canonical "I checked and found nothing" helper for enrichers writing a verdict/classification column to Postgres. |
|
Package obs provides fleet-canonical runtime observability: a localhost-only debug server exposing net/http/pprof plus a /metrics mirror, and a helper to (idempotently) register the Go runtime + process Prometheus collectors.
|
Package obs provides fleet-canonical runtime observability: a localhost-only debug server exposing net/http/pprof plus a /metrics mirror, and a helper to (idempotently) register the Go runtime + process Prometheus collectors. |
|
Package openapi provides types and helpers for building OpenAPI 3.0.3 specification documents that fleet services expose at /openapi.json.
|
Package openapi provides types and helpers for building OpenAPI 3.0.3 specification documents that fleet services expose at /openapi.json. |
|
Package pagination provides canonical types and helpers for cursor-based and offset-based paginated API responses.
|
Package pagination provides canonical types and helpers for cursor-based and offset-based paginated API responses. |
|
Package pentest provides security-testing helpers: a bounded-concurrency worker pool for concurrent payload delivery and a result aggregator.
|
Package pentest provides security-testing helpers: a bounded-concurrency worker pool for concurrent payload delivery and a result aggregator. |
|
Package policyeval is a pure-Go rule engine for in-process policy evaluation.
|
Package policyeval is a pure-Go rule engine for in-process policy evaluation. |
|
Package profiling provides opt-in continuous Go profiling through Grafana Pyroscope.
|
Package profiling provides opt-in continuous Go profiling through Grafana Pyroscope. |
|
Package promx provides fleet-wide Prometheus collectors and a single-call AutoWire function that installs all observers.
|
Package promx provides fleet-wide Prometheus collectors and a single-call AutoWire function that installs all observers. |
|
Package proxysupplier resolves the upstream egress-proxy URL for outbound HTTP requests.
|
Package proxysupplier resolves the upstream egress-proxy URL for outbound HTTP requests. |
|
Package qrterm turns a short piece of content — a URL, an id, a token — into a QR code an operator can scan straight off a terminal, or an image/png a browser/client can render.
|
Package qrterm turns a short piece of content — a URL, an id, a token — into a QR code an operator can scan straight off a terminal, or an image/png a browser/client can render. |
|
Package ratecoord provides a distributed rate-limit coordination client.
|
Package ratecoord provides a distributed rate-limit coordination client. |
|
Package reqstats emits per-request resource stats on every HTTP response: a W3C Server-Timing header (human/devtools) and an X-Request-Stats JSON header (machine/cost-engine).
|
Package reqstats emits per-request resource stats on every HTTP response: a W3C Server-Timing header (human/devtools) and an X-Request-Stats JSON header (machine/cost-engine). |
|
Package resilience composes the fleet's outbound-call protections into one policy: a load-shed gate, a circuit breaker, and retries limited by a budget.
|
Package resilience composes the fleet's outbound-call protections into one policy: a load-shed gate, a circuit breaker, and retries limited by a budget. |
|
Package response provides the canonical fleet HTTP response envelope.
|
Package response provides the canonical fleet HTTP response envelope. |
|
Package retry provides context-aware retry logic with configurable backoff strategies.
|
Package retry provides context-aware retry logic with configurable backoff strategies. |
|
Package runtimetune applies conservative, container-aware Go runtime memory/GC tuning at process start.
|
Package runtimetune applies conservative, container-aware Go runtime memory/GC tuning at process start. |
|
Package safehttp is the HTTP client for the PUBLIC internet: an *http.Client that refuses to connect to internal addresses (SSRF), plus the URL and IP checks it is built from.
|
Package safehttp is the HTTP client for the PUBLIC internet: an *http.Client that refuses to connect to internal addresses (SSRF), plus the URL and IP checks it is built from. |
|
scripts
|
|
|
compatcheck
command
Command compatcheck reports whether a service's go.mod pins a go-common version that is missing a security fix go-common shipped.
|
Command compatcheck reports whether a service's go.mod pins a go-common version that is missing a security fix go-common shipped. |
|
envdoc
command
Command envdoc generates docs/ENV.md, the list of environment variables that go-common packages declare in the env registry.
|
Command envdoc generates docs/ENV.md, the list of environment variables that go-common packages declare in the env registry. |
|
linkcheck/service
command
Command service is the reference binary of scripts/linkcheck.sh: the smallest fleet service, which loads its config, builds the default server stack with server.New and serves it.
|
Command service is the reference binary of scripts/linkcheck.sh: the smallest fleet service, which loads its config, builds the default server stack with server.New and serves it. |
|
pkgindex
command
Command pkgindex generates docs/PACKAGES.md, the index of every importable go-common package, from the packages' own doc comments.
|
Command pkgindex generates docs/PACKAGES.md, the index of every importable go-common package, from the packages' own doc comments. |
|
whatchanged
command
Command whatchanged prints the behaviour changes between two go-common releases and maintains the feed they are read from.
|
Command whatchanged prints the behaviour changes between two go-common releases and maintains the feed they are read from. |
|
Package secrets is the canonical client for go-fleet-secrets, the fleet vault.
|
Package secrets is the canonical client for go-fleet-secrets, the fleet vault. |
|
Package selftest gives every fleet service ONE canonical way to declare and serve a /selftest endpoint.
|
Package selftest gives every fleet service ONE canonical way to declare and serve a /selftest endpoint. |
|
Package server provides the canonical fleet HTTP server bootstrap.
|
Package server provides the canonical fleet HTTP server bootstrap. |
|
Package shutdown provides a single-call graceful shutdown helper for net/http servers.
|
Package shutdown provides a single-call graceful shutdown helper for net/http servers. |
|
Package spiffe adapts the SPIFFE Workload API to credentiallease identities.
|
Package spiffe adapts the SPIFFE Workload API to credentiallease identities. |
|
Package telemetry installs W3C trace propagation, creates privacy-conscious inbound/outbound HTTP spans, and exports them with OTLP/HTTP when configured.
|
Package telemetry installs W3C trace propagation, creates privacy-conscious inbound/outbound HTTP spans, and exports them with OTLP/HTTP when configured. |
|
testhelpers
|
|
|
fakeexec
Package fakeexec provides an in-memory fake for the command-runner seam used across the fleet to shell out to git / go / docker:
|
Package fakeexec provides an in-memory fake for the command-runner seam used across the fleet to shell out to git / go / docker: |
|
fakegraph
Package fakegraph captures graph.Event values for use in tests.
|
Package fakegraph captures graph.Event values for use in tests. |
|
fakekey
Package fakekey provides an in-memory implementation of the apikey.Verifier interface for use in tests.
|
Package fakekey provides an in-memory implementation of the apikey.Verifier interface for use in tests. |
|
httpmock
Package httpmock provides canonical httptest.Server factories for common fleet upstream patterns.
|
Package httpmock provides canonical httptest.Server factories for common fleet upstream patterns. |
|
leakcheck
Package leakcheck fails a test that leaves goroutines running.
|
Package leakcheck fails a test that leaves goroutines running. |
|
promxtest
Package promxtest tests that a Prometheus collector cannot be made to create an unbounded number of series: it drives hostile label values through the collector and counts what the registry would hand Prometheus.
|
Package promxtest tests that a Prometheus collector cannot be made to create an unbounded number of series: it drives hostile label values through the collector and counts what the registry would hand Prometheus. |
|
ssrfcorpus
Package ssrfcorpus is one shared table of server-side-request-forgery probe targets, for testing any code that decides whether a host may be contacted: safehttp's guard, egressproxy's guard, a fetcher's default client.
|
Package ssrfcorpus is one shared table of server-side-request-forgery probe targets, for testing any code that decides whether a host may be contacted: safehttp's guard, egressproxy's guard, a fetcher's default client. |
|
testclock
Package testclock re-exports clock.NewMock and clock.Mock for use in tests without importing the full clock package.
|
Package testclock re-exports clock.NewMock and clock.Mock for use in tests without importing the full clock package. |
|
Package ua builds the fleet User-Agent header value.
|
Package ua builds the fleet User-Agent header value. |
|
Package validate provides struct-tag-driven JSON request decoding and validation.
|
Package validate provides struct-tag-driven JSON request decoding and validation. |
|
Package version exposes build identity variables that are injected at link time via -ldflags.
|
Package version exposes build identity variables that are injected at link time via -ldflags. |
|
Package wordbound is the canonical fix for a Go regexp footgun that has independently bitten at least two fleet services: `\b` (word boundary) is ASCII-only — per the regexp/syntax docs, a "word" character for `\b` purposes is exactly [0-9A-Za-z_].
|
Package wordbound is the canonical fix for a Go regexp footgun that has independently bitten at least two fleet services: `\b` (word boundary) is ASCII-only — per the regexp/syntax docs, a "word" character for `\b` purposes is exactly [0-9A-Za-z_]. |
|
Package workpool provides a bounded-concurrency worker pool backed by a semaphore and a WaitGroup.
|
Package workpool provides a bounded-concurrency worker pool backed by a semaphore and a WaitGroup. |
Click to show internal directories.
Click to hide internal directories.