Expand description
Automatic hostnames for daemons.
Every daemon that configures a port gets a hostname derived from where its
configuration lives, resolved right to left against a registry of projects:
<daemon>.<worktree>.<project>.<tld> daemon in a linked git worktree
<daemon>.<project>.<tld> daemon in the primary checkout
<worktree>.<project>.<tld> stack page (not a daemon)
<project>.<tld> project page (not a daemon)Labels are DNS-safe lowercase. The project label is the label its
registration names (pitchfork config add --label), else the namespace’s
project name when the project declares one explicitly, otherwise the
directory name of the primary checkout. The worktree label is the linked worktree’s
directory name unless the config sets worktree_label.
Structs§
- Checkout
- Where a directory sits in a git repository.
- Checkout
Hosts - One checkout of a project and the daemons reachable within it.
- Daemon
Host - A daemon reachable under a checkout’s hostname, and how its TLS is served.
- Host
Registry - All projects the proxy can route to, keyed by project label.
- Project
Hosts - A project and its checkouts, keyed by hostname label.
Enums§
- Host
Target - What a hostname resolves to.
Functions§
- auto_
host_ for_ daemon - The automatic hostname (without TLD) for a daemon, e.g.
api.fix-1.myproj. - checkout_
root_ of - The root of the checkout a directory belongs to, canonicalized.
- daemon_
label - The daemon label for a daemon config: its name, or the
proxyoverride. - detect_
checkout - Locate the checkout containing
dirby walking up to the nearest.git. - host_
for_ daemon - The hostname to advertise for a daemon: a legacy
[slugs]entry when one exists, otherwise the automatic hostname. - hostname_
fits - Whether a hostname’s labels still leave room for the configured TLD.
- project_
label - The project label for a primary checkout.
- sanitize_
label - Convert an arbitrary name into a DNS-safe lowercase label.
- validate_
registered_ label - Check that a label a registration names is usable as written.
- warn_
once - Report a configuration problem once per distinct message.
- worktree_
label - The worktree label for a linked worktree directory.