Documentation
¶
Overview ¶
Package agent carries the compiled komizo-box binaries, so that installing one is something `komizo init` can do over a plain SSH connection.
EMBEDDED rather than downloaded. init already works on a box with nothing on it but sshd, and making it fetch a release URL would add a network dependency and a supply-chain step to the one operation that is supposed to work when very little else does. It is also the pattern komizo already uses for the provisioning shell -- see scripts/embed.go -- for the same reason.
The cost is the CLI's size, and one build-order constraint: the binaries have to EXIST before the CLI is compiled, because //go:embed reads the filesystem at build time and cannot invoke a compiler. `make agents` builds them; the release workflow runs it. A CLI built without that step still compiles and still does everything else -- the failure is one clear message at the moment somebody tries to install an agent, rather than a build nobody can run.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Arches = []string{"amd64", "arm64"}
Arches are the architectures komizo ships an agent for.
Two, because they are what servers are. amd64 is every ordinary VPS, and arm64 is the cheap tier at most providers -- Hetzner, Oracle, AWS Graviton -- which is exactly the tier a project running its own boxes ends up on.
Functions ¶
func ArchFor ¶
ArchFor maps what `uname -m` says to what komizo builds.
The box is asked rather than assumed. komizo is pointed at other people's servers, and a laptop's architecture says nothing about theirs -- installing an amd64 binary on an arm64 box produces "not found" from the kernel, which is the single most confusing thing an exec can say.
func Stamp ¶
func Stamp() string
Stamp is the content hash of every agent this komizo carries.
What it answers is "would running the update change anything" -- so it is over the bytes that would be installed, and it covers ALL architectures so that the same komizo produces the same stamp whatever box it is talking to. A per-architecture stamp would make two boxes disagree about whether they were up to date while running the same release.
Empty when no agent is embedded, which reads as "nothing to install" rather than as a hash of nothing.
Types ¶
This section is empty.