Documentation
¶
Overview ¶
Package sys holds the production implementations of the control plane's system seams — the wall Clock, a crypto/rand ID source, the DNS Resolver, and the publish pre-flight's authoritative resolver and HTTP probe — the concrete values cmd/burrowd injects in place of the test fakes (ADR-0010). It lives under controlplane/ (not controlplane/internal) so cmd/burrowd and the managed module can wire it; it is licensed Apache-2.0.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthoritativeResolver ¶
type AuthoritativeResolver struct{}
AuthoritativeResolver answers a lookup at the nameservers the host's own zone is delegated to, which is the resolver the publish pre-flight wants: a record written moments ago is already there, while a recursive resolver may still be inside the negative TTL of the answer it cached before the record existed (ADR-0041 §3).
func (AuthoritativeResolver) LookupHostAuthoritative ¶
func (AuthoritativeResolver) LookupHostAuthoritative(ctx context.Context, host string) ([]string, error)
LookupHostAuthoritative finds the nameservers for the closest zone containing host and asks one of them directly. It errors when no zone in the name has a nameserver that will answer; the caller falls back to the recursive Resolver rather than treating that as "does not resolve".
type HTTPProbe ¶
type HTTPProbe struct{}
HTTPProbe makes the publish pre-flight's one plain-HTTP request (ADR-0041 §3). It follows no redirect — a 301 to HTTPS still proves the cluster answered on port 80 for that host — and it reads no body, because the only question is whether the request arrived at all.
type IDs ¶
type IDs struct{}
IDs mints release identifiers from crypto/rand: 128 bits of randomness, hex-encoded.
type Resolver ¶
type Resolver struct{}
Resolver answers reachability's DNS lookups against public recursive resolvers (publicDNS), falling back to the system resolver only when none are reachable (e.g. a cluster with restricted egress), so the check still works there.
func (Resolver) LookupHost ¶
LookupHost returns the addresses host resolves to in public DNS. A genuine "not found" from a public resolver is returned as-is (the host really does not resolve); any other failure — unreachable resolver, timeout — falls back to the system resolver rather than reporting the host unresolved.