Directories
¶
| Path | Synopsis |
|---|---|
|
Package admin holds the OpenAPI description of the /_emu/v1/ admin API (SRS 7.3), embedded in the binary for `gcpemu admin openapi`.
|
Package admin holds the OpenAPI description of the /_emu/v1/ admin API (SRS 7.3), embedded in the binary for `gcpemu admin openapi`. |
|
Package agent runs gcpemu helper processes inside containers the emulator launches (GKE node metadata proxy, Cloud SQL server-side proxy).
|
Package agent runs gcpemu helper processes inside containers the emulator launches (GKE node metadata proxy, Cloud SQL server-side proxy). |
|
Package apidef holds the API surface generated from Google's published definitions (NFR-MNT-001): the google.api.http routes and field behaviours (AIP-203) of the gRPC APIs, read from googleapis at the commit pinned in apis.yaml, and the methods and field annotations of the discovery (JSON/REST) APIs, read from the discovery documents vendored in the google.golang.org/api module pinned in go.mod.
|
Package apidef holds the API surface generated from Google's published definitions (NFR-MNT-001): the google.api.http routes and field behaviours (AIP-203) of the gRPC APIs, read from googleapis at the commit pinned in apis.yaml, and the methods and field annotations of the discovery (JSON/REST) APIs, read from the discovery documents vendored in the google.golang.org/api module pinned in go.mod. |
|
internal/apigen
command
Command apigen generates internal/apidef's route and field-behaviour tables (NFR-MNT-001) from Google's published API definitions:
|
Command apigen generates internal/apidef's route and field-behaviour tables (NFR-MNT-001) from Google's published API definitions: |
|
Package apierr models GCP API errors and renders them as the JSON error envelope used by REST APIs and as google.rpc.Status for gRPC (FR-CORE-025).
|
Package apierr models GCP API errors and renders them as the JSON error envelope used by REST APIs and as google.rpc.Status for gRPC (FR-CORE-025). |
|
Package ca is the emulator's local certificate authority (Section 7.4).
|
Package ca is the emulator's local certificate authority (Section 7.4). |
|
Package cli implements the gcpemu command line (FR-CORE-001..007).
|
Package cli implements the gcpemu command line (FR-CORE-001..007). |
|
Package clock provides the emulator's clock: real by default, a fake advanceable clock under --deterministic or `gcpemu time advance` (NFR-REL-002).
|
Package clock provides the emulator's clock: real by default, a fake advanceable clock under --deterministic or `gcpemu time advance` (NFR-REL-002). |
|
Package config loads emulator configuration with the precedence flags > env (GCPEMU_*) > gcpemu.yaml > defaults (FR-CORE-010).
|
Package config loads emulator configuration with the precedence flags > env (GCPEMU_*) > gcpemu.yaml > defaults (FR-CORE-010). |
|
Package emu defines the contract between the emulator core and service modules (NFR-MNT-002) and the shared environment they run in.
|
Package emu defines the contract between the emulator core and service modules (NFR-MNT-002) and the shared environment they run in. |
|
Package escapeguard is the Escape guard (see CONTEXT.md): a proxy that OpenTofu and gcloud runs in the acceptance tests go through, so that an Escaped request fails the test, naming the host, instead of reaching Google.
|
Package escapeguard is the Escape guard (see CONTEXT.md): a proxy that OpenTofu and gcloud runs in the acceptance tests go through, so that an Escaped request fails the test, naming the host, instead of reaching Google. |
|
Package events is the Instance's change feed, served as server-sent events at /_emu/v1/events (FR-CORE-045, FR-UI-006): resource changes, Operation progress, Request log entries and IAM denials.
|
Package events is the Instance's change feed, served as server-sent events at /_emu/v1/events (FR-CORE-045, FR-UI-006): resource changes, Operation progress, Request log entries and IAM denials. |
|
Package fault implements fault injection rules (FR-CORE-060): inject an error code, latency or a dropped connection by service, method, resource pattern and probability or count.
|
Package fault implements fault injection rules (FR-CORE-060): inject an error code, latency or a dropped connection by service, method, resource pattern and probability or count. |
|
Package frontend is the emulator's "Google front end": a TLS terminator that lets unmodified clients reach emulated services by their real hostnames (storage.googleapis.com, pubsub.googleapis.com, LOCATION-docker.pkg.dev, ...) over HTTPS, HTTP/2 and gRPC (FR-INT-007, FR-CORE-043).
|
Package frontend is the emulator's "Google front end": a TLS terminator that lets unmodified clients reach emulated services by their real hostnames (storage.googleapis.com, pubsub.googleapis.com, LOCATION-docker.pkg.dev, ...) over HTTPS, HTTP/2 and gRPC (FR-INT-007, FR-CORE-043). |
|
Package gateway is the control-plane gateway (FR-CORE-040): one listener serving every API over HTTP/1.1 REST and gRPC (h2c), routing by path prefix and Host, authenticating callers and recording the request log.
|
Package gateway is the control-plane gateway (FR-CORE-040): one listener serving every API over HTTP/1.1 REST and gRPC (h2c), routing by path prefix and Host, authenticating callers and recording the request log. |
|
Package hostmode implements host mode (FR-CORE-043): host processes reach emulated services by their real hostnames (storage.googleapis.com, LOCATION-docker.pkg.dev, ...) once the local CA is trusted.
|
Package hostmode implements host mode (FR-CORE-043): host processes reach emulated services by their real hostnames (storage.googleapis.com, LOCATION-docker.pkg.dev, ...) once the local CA is trusted. |
|
Package instance assembles and runs one emulator instance: state store, gateway, admin API and the selected services.
|
Package instance assembles and runs one emulator instance: state store, gateway, admin API and the selected services. |
|
Package locations embeds the real Google Cloud regions and zones (FR-CORE-021) so every service validates locations the same way.
|
Package locations embeds the real Google Cloud regions and zones (FR-CORE-021) so every service validates locations the same way. |
|
Package loopback reports whether the host has loopback addresses beyond 127.0.0.1 (ADR 0005).
|
Package loopback reports whether the host has loopback addresses beyond 127.0.0.1 (ADR 0005). |
|
Package lro implements google.longrunning Operations for services whose mutations are long-running in GCP (FR-CORE-023).
|
Package lro implements google.longrunning Operations for services whose mutations are long-running in GCP (FR-CORE-023). |
|
Package netplane connects the emulator process to the container networks it creates (Section 3.3).
|
Package netplane connects the emulator process to the container networks it creates (Section 3.3). |
|
Package project implements project identity (FR-CORE-020): any project ID is accepted, and its number is derived deterministically from the ID.
|
Package project implements project identity (FR-CORE-020): any project ID is accepted, and its number is derived deterministically from the ID. |
|
Package reqlog records every API call and data-plane request as a structured entry (FR-CORE-061) and keeps the most recent ones in memory for the admin API (FR-CORE-045).
|
Package reqlog records every API call and data-plane request as a structured entry (FR-CORE-061) and keeps the most recent ones in memory for the admin API (FR-CORE-045). |
|
Package runtime is the container runtime driver (Section 3.1): a small client for the Docker Engine API, which Docker Engine and Podman (its Docker-compatible socket) both serve.
|
Package runtime is the container runtime driver (Section 3.1): a small client for the Docker Engine API, which Docker Engine and Podman (its Docker-compatible socket) both serve. |
|
Package store is the control-plane state store (FR-CORE-032): a small transactional, namespaced key-value interface with an in-memory implementation for --ephemeral and a bbolt (pure Go) one for --data-dir.
|
Package store is the control-plane state store (FR-CORE-032): a small transactional, namespaced key-value interface with an in-memory implementation for --ephemeral and a bbolt (pure Go) one for --data-dir. |
|
Package transcode serves the REST surface of gRPC services: it maps the google.api.http bindings generated into internal/apidef onto the services' gRPC implementations (AIP-127), validating each request's field behaviours on the way in.
|
Package transcode serves the REST surface of gRPC services: it maps the google.api.http bindings generated into internal/apidef onto the services' gRPC implementations (AIP-127), validating each request's field behaviours on the way in. |
|
Package trust builds CA bundles that combine the host's system roots with the emulator's local CA (Section 7.4), for clients that read a single bundle file: SSL_CERT_FILE from `gcpemu env --trust` (FR-CORE-004) and the bundle injected into GKE pods (FR-INT-007).
|
Package trust builds CA bundles that combine the host's system roots with the emulator's local CA (Section 7.4), for clients that read a single bundle file: SSL_CERT_FILE from `gcpemu env --trust` (FR-CORE-004) and the bundle injected into GKE pods (FR-INT-007). |
|
Package vmrelay implements the VM relay (ADR 0005).
|
Package vmrelay implements the VM relay (ADR 0005). |
|
Package webconsole serves the Web console's bundle on the gateway under /console (FR-UI-002).
|
Package webconsole serves the Web console's bundle on the gateway under /console (FR-UI-002). |
Click to show internal directories.
Click to hide internal directories.