sys

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package sys holds the production implementations of the control plane's system seams — the wall Clock, a crypto/rand ID source, and the DNS Resolver — 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 Clock

type Clock struct{}

Clock is the real wall clock.

func (Clock) Now

func (Clock) Now() time.Time

Now returns the current time.

type IDs

type IDs struct{}

IDs mints release identifiers from crypto/rand: 128 bits of randomness, hex-encoded.

func (IDs) NewID

func (IDs) NewID() string

NewID returns a fresh random identifier. It panics only if the system's secure random source fails, which is unrecoverable and does not happen in normal operation.

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

func (Resolver) LookupHost(ctx context.Context, host string) ([]string, error)

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.

Jump to

Keyboard shortcuts

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