Documentation
¶
Overview ¶
Package agent runs gcpemu helper processes inside containers the emulator launches (GKE node metadata proxy, Cloud SQL server-side proxy). The emulator copies its own static binary into the container and starts it with GCPEMU_AGENT=<name>; Main dispatches to the registered agent.
Index ¶
Constants ¶
const BinaryEnv = "GCPEMU_AGENT_BINARY"
BinaryEnv overrides the binary copied into containers (tests set it to a CGO_ENABLED=0 build of ./cmd/gcpemu).
const ContainerPath = "/gcpemu/gcpemu"
ContainerPath is where the binary is placed inside containers.
const EnvVar = "GCPEMU_AGENT"
EnvVar selects the agent to run.
Variables ¶
This section is empty.
Functions ¶
func Binary ¶
Binary returns the path of a static linux binary of gcpemu for the host architecture, suitable for copying into containers.
func BuildForTests ¶
BuildForTests compiles ./cmd/gcpemu with CGO_ENABLED=0 into dir (once per process) and sets GCPEMU_AGENT_BINARY. moduleRoot is the repository root.