Skip to main content

Module bootstrap

Module bootstrap 

Source
Expand description

Bootstrap config resolution.

Reads ~/.gobby/bootstrap.yaml to discover how the Gobby daemon is reachable: its TCP port and bind host. Falls back to loopback defaults when the file is missing, unreadable, or malformed — clients should always get something usable rather than error on startup.

The daemon advertises bind_host as a listen address. 0.0.0.0 and :: are valid listen addresses but invalid dial addresses — a user who sets bind_host: 0.0.0.0 to expose the daemon on their LAN must still connect to 127.0.0.1 locally. Normalization lives in daemon_url (the caller concerned with dialing), not here; this module returns the raw endpoint as written.

Structs§

DaemonEndpoint
A daemon endpoint as advertised by bootstrap.yaml.
HubDatabaseBootstrap

Constants§

DEFAULT_BIND_HOST
Default bind host when bootstrap.yaml is missing or malformed.
DEFAULT_DAEMON_PORT
Default daemon port when bootstrap.yaml is missing or malformed.

Functions§

bootstrap_path
Resolve the path to bootstrap.yaml inside the Gobby home directory.
parse_hub_database_bootstrap
postgres_database_url_from_bootstrap
postgres_database_url_from_bootstrap_file
read_daemon_endpoint
Read the daemon endpoint from the default bootstrap path.
read_daemon_endpoint_at
Read the daemon endpoint from a specific bootstrap file path.
read_hub_database_bootstrap_file