Documentation
¶
Overview ¶
Package lanbind holds what the emulator says about the --lb-bind, --gke-bind, --ar-bind, --gfe-bind, --sql-bind and --link-bind addresses in a Containerized Instance, in one place so that start, the Services and doctor say the same (#497, ADR 0011).
A Containerized Instance on a bridge network has only its container's addresses: they reach container networks, never the LAN. Publishing a port on a host address is no substitute (its listeners are --bind's, which don't require credentials), so the fix is to run the container on the host's network, or the native binary on a VM runtime.
Index ¶
Constants ¶
const Fix = "to reach the LAN, run the container with `--network host` on Linux, or the native binary on a VM runtime (ADR 0011)"
Fix is how a Containerized Instance serves these flags on the LAN.
Variables ¶
This section is empty.
Functions ¶
func Explain ¶
Explain adds the cause and Fix to err, the failure to bind a --*-bind address, when the address is not one of the Instance's network namespace in a container. Any other err, and any err on the Host, is returned unchanged.
Types ¶
type Where ¶
type Where int
Where is the network namespace the Instance binds the addresses in.
const ( // Host: the host, or a container on the host's network, where the // flags work as documented. Host Where = iota // Bridge: a Containerized Instance whose runtime confirms its own // container, so not on the host's network. Bridge // Unconfirmed: a Containerized Instance by --containerized or the // marker files alone, its runtime not confirming it (no socket, not // reachable yet, or not finding its container); it may be on the // host's network. Unconfirmed )
func Locate ¶
Locate decides Where: containerized is whether the Instance is a Containerized Instance (runtime.DecideContainerized), and confirmed whether the runtime found the emulator's own container, so that the decision is its answer. Bridge needs that answer; a decision without it is Unconfirmed (#564).