Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultEndpoint ¶
func DefaultEndpoint() string
DefaultEndpoint returns the per-platform default daemon endpoint. Windows talks to a daemon running inside WSL2 over loopback TCP; other platforms use a local Unix socket.
func DefaultPath ¶
func DefaultPath() string
DefaultPath returns the default config file location (~/.jerboa/config.toml).
func ResolveEndpoint ¶
ResolveEndpoint determines the daemon endpoint using the precedence: explicit override > JERBOA_HOST env var > config file > platform default. override carries the value of an explicit CLI flag (empty if unset).
func ResolveToken ¶
func ResolveToken() string
ResolveToken returns the client auth token: the JERBOA_AUTH_TOKEN environment variable takes precedence over the config file's [daemon] token. Empty means no authentication.
Types ¶
type Config ¶
type Config struct {
Hypervisor string `toml:"hypervisor"`
Daemon DaemonConfig `toml:"daemon"`
}
Config holds global jerboa configuration stored at ~/.jerboa/config.toml.
type DaemonConfig ¶
type DaemonConfig struct {
// Endpoint is the daemon address (e.g. unix:///var/run/jerboad.sock or
// tcp://127.0.0.1:7890). Empty falls back to the per-platform default.
Endpoint string `toml:"endpoint"`
// Distro is the WSL2 distribution to host the daemon on Windows. Empty uses
// the WSL default distro.
Distro string `toml:"distro"`
// JerboadPath is the jerboad binary path inside the WSL distro. Empty resolves
// "jerboad" on the distro's PATH.
JerboadPath string `toml:"jerboad_path"`
// Token is the shared secret sent to the daemon via the Auth.Hello
// handshake. Overridden by the JERBOA_AUTH_TOKEN environment variable.
Token string `toml:"token"`
}
DaemonConfig holds client-side daemon connection settings.