gcpemu

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2026 License: Apache-2.0

README

gcpemu

A single Go binary that emulates Google Cloud services on a workstation or in CI, so the same OpenTofu modules, client SDKs and application code that target GCP run unmodified except for endpoint configuration. See the SRS.

Status

Milestones M1 (core, IAM, Cloud Storage, Pub/Sub, Cloud DNS, Artifact Registry), M2 (compute networking, Cloud SQL, GKE, Cloud NAT) and M3 (Application Load Balancer, Cloud CDN, backend mTLS, Certificate Manager, host mode) are implemented. The full SRS 11.2 reference stack (steps 1–10) passes on linux/amd64 (make e2e).

Service Package Highlights
Core internal/… CLI, gateway (REST + gRPC on one port), admin API, store (memory/bbolt), seed files, fault injection, request log
IAM services/iam Service accounts and keys, roles, policies with conditions, audit/enforce, OAuth2 token endpoint, IAM Credentials, metadata server, STS/WIF
Cloud Storage services/gcs JSON + XML APIs, resumable uploads, generations/preconditions, checksums, V4 signed URLs, notifications, lifecycle, HMAC
Pub/Sub services/pubsub gRPC + REST, streaming pull, ordering, DLQ, filters, push with OIDC, exactly-once, snapshots/seek, schemas
Cloud DNS services/dns Zones, record sets, changes; authoritative UDP/TCP server with forwarding
Artifact Registry services/ar Repositories API with LROs; OCI Distribution v1.1 registry with referrers; pull-through cache, remote and virtual repositories
Compute networking services/compute Networks, subnetworks, firewalls, routes, addresses, routers, NEGs, operations; servicenetworking; subnetworks realised as container networks
Cloud NAT services/compute, services/nat Router NAT configs drive an egress gateway container; drop/reject, logging, offline sink
Cloud SQL services/sql sqladmin v1beta4/v1 over real PostgreSQL 14–17 containers; connector (3307), IAM DB auth, authorized networks, private IP, backups, import/export
GKE services/gke container v1 (gRPC + REST) over real k3s clusters; node pools, IAM-backed kube auth, Workload Identity, private nodes via NAT, NEG sync, real-hostname Google APIs in pods
Application Load Balancer services/lb Forwarding rules, proxies, URL maps, backend services/buckets, health checks, SSL certs/policies; in-process L7 proxy with frontend/backend mTLS, NEG and bucket backends, access logs
Cloud CDN services/cdn Cache modes, keys, TTLs, revalidation, negative caching, signed URLs/cookies, invalidation, LRU disk cache
Certificate Manager, Network Security services/certs Certificates (self-managed and managed via the local CA), maps, trust configs, DNS authorizations; backend authentication configs, server TLS policies

Quick start

make build
bin/gcpemu start --detach --services gcs,pubsub --seed seed.yaml
eval "$(bin/gcpemu env)"       # STORAGE_EMULATOR_HOST, PUBSUB_EMULATOR_HOST, GCE_METADATA_HOST, …
bin/gcpemu status
bin/gcpemu tofu-provider --project my-project   # provider "google" block with custom endpoints
bin/gcpemu stop

Other commands: reset, logs [service] [--requests], time advance 24h, hosts, fault add|list|clear, doctor, version, and admin openapi (the OpenAPI document of the /_emu/v1/ admin API, also served at /_emu/v1/openapi.yaml).

Endpoints

All control-plane APIs are served by the gateway (default 127.0.0.1:4510), under /<api>/ (for example /pubsub/v1/…, /iam/v1/…) and at their native root paths where unambiguous (/storage/v1/, /dns/v1/, /compute/v1/, /sql/v1beta4/). Per-service ports: GCS 4443, Pub/Sub 8085, registry 5000, DNS 5353 (UDP+TCP), metadata 8988, Cloud SQL host ports 54320+. gcpemu env also exports KUBECONFIG for GKE clusters. --port name=0 picks a free port for one listener and a bare --port 0 for all of them (LB and Cloud SQL host ports included); --port-range 20000-20999 draws those free ports from a range. The choices are written to <data-dir>/endpoints.json and printed by gcpemu env.

Container runtime

Cloud SQL, GKE and Cloud NAT need Docker Engine (>= 24) or Podman (>= 4.9, Docker-compatible socket; DOCKER_HOST is honoured). Everything the emulator creates is labelled gcpemu.instance=<id>; containers are removed on stop, and with --data-dir the volumes holding Postgres and Kubernetes state are kept so resources survive a restart. The emulator copies its own (static) binary into containers as an in-container agent. GKE is Linux-only.

Cloud NAT knobs: natReject / GCPEMU_NAT_REJECT=true rejects uncovered egress immediately instead of timing out; with --offline, NAT-allowed egress hits a sink that records the attempt and returns natSinkResponse (GCPEMU_NAT_SINK_RESPONSE, default 503:gcpemu offline: egress blocked). GCPEMU_GKE_MAX_NODES caps nodes per instance (default 5). LoadBalancer Services are given node addresses on the cluster's VPC by k3s's built-in service load balancer (servicelb), the emulator's in-cluster L4 allocator (FR-GKE-009).

Real hostnames: GKE pods and host mode

The emulator includes a "Google frontend" (endpoint frontend, a dynamic port unless you pass --port frontend=N). It terminates TLS for the real hostnames the gateway serves (storage.googleapis.com, pubsub.googleapis.com, sqladmin.googleapis.com, iamcredentials.googleapis.com, oauth2.googleapis.com, …) and for every LOCATION-docker.pkg.dev. Certificates come from the instance CA (<data-dir>/ca.pem). It then passes HTTP/1.1, HTTP/2 and gRPC through to the emulator unchanged. APIs the emulator doesn't serve (logging.googleapis.com, …) are never redirected.

GKE pods use real hostnames automatically. Each node answers DNS for the served names with 169.254.169.254 and relays port 443 there to the frontend. A mutating admission webhook mounts a bundle of the host's system roots plus the emulator CA at /etc/ssl/certs/ca-certificates.crt and /etc/gcpemu/certs/. It also sets SSL_CERT_FILE, REQUESTS_CA_BUNDLE, NODE_EXTRA_CA_CERTS and GCE_METADATA_HOST. Unmodified Go, Python, Java and Node clients get Workload Identity tokens from the metadata server and reach the emulated services without any endpoint configuration. To opt a namespace or a pod out, label it gcpemu.dev/inject=disabled; kube-system is always skipped. Nodes also trust the CA in their own system store.

Host mode (gcpemu start --host-mode, Linux) does the same for host processes without root. It starts a labelled container (gcpemu-<id>-hostmode) that the host reaches at its container IP. The container serves HTTPS on :443, plain HTTP on :80 and DNS on :53, answering the served names with its own IP. It forwards other googleapis.com/pkg.dev names to your real upstream resolvers and everything else to the emulated Cloud DNS. gcpemu env prints the IP as GCPEMU_HOST_MODE_IP and writes setup steps to stderr. There are two ways to send the names there:

# per-domain DNS routing with systemd-resolved (lasts until the bridge restarts)
sudo resolvectl dns <bridge-if> <ip> && sudo resolvectl domain <bridge-if> ~googleapis.com ~pkg.dev
# or a static /etc/hosts block (remove it when done)
gcpemu hosts | sudo tee -a /etc/hosts

Then trust the CA system-wide with gcpemu ca install (on Linux it also adds the CA to Docker's and containerd's per-registry trust for every LOCATION-docker.pkg.dev), or per shell with eval "$(gcpemu env --trust)". That sets SSL_CERT_FILE to <data-dir>/ca-bundle.pem, which holds the system roots plus the emulator CA. gcpemu env always exports GCPEMU_CA_FILE. To test without changing the host, use curl --resolve storage.googleapis.com:443:<ip> --cacert "$GCPEMU_CA_FILE" …, or give Go clients a net.Resolver that dials <ip>:53.

Configuration

Flags > GCPEMU_* env vars > gcpemu.yaml > defaults. CI=true implies --ephemeral and JSON logs. IAM runs in audit mode by default (--iam-mode off|audit|enforce).

Seed files

Top-level keys are projects, faults and service names (iam, compute, gcs, pubsub, dns, ar, sql, gke). Each service documents its section in its seed.go.

Go tests
inst := emutest.Start(t, []string{"gcs", "pubsub"})
inst.Setenv(t) // client env vars for this test
GitHub Actions
- uses: linuxuser586/gcpemu/setup-gcpemu@v1
  with:
    services: gcs,pubsub,sql
    seed: test/emu-seed.yaml

This installs the release binary after checking it against SHA256SUMS, and starts the instance once the seed has been applied. It exports gcpemu env to later steps. When the job fails, it uploads the logs, request log, resource dump and kubeconfig as an artifact. See setup-gcpemu/README.md. Releases are published from vX.Y.Z tags.

Reference stack (SRS 11.2)

e2e/ is the acceptance test of the whole emulator: one OpenTofu root module (e2e/stack/), a Go API (e2e/app/) and TestReferenceStack, which drives them against an in-process emulator with IAM in enforce mode:

  1. tofu apply creates a VPC and subnet (pod/service ranges), Cloud Router + NAT, a private GKE cluster with Workload Identity and a node pool, an Artifact Registry repo, buckets (static assets, uploads with a Pub/Sub notification), a topic with an OIDC push subscription, Cloud SQL Postgres 16 on a private IP with an IAM service account user, the example.test. zone and a global external ALB with Cloud CDN (backend bucket, NEG backend service with backend mTLS, managed certificate, HTTP→HTTPS redirect); a plan right after must be empty;
  2. the app is built for amd64 and arm64 FROM scratch and pushed to AR, Istio is installed from its Helm charts (its ingress gateway requires the LB's client certificate), the app is deployed and a second apply (api_neg_name) adds the gateway's GKE NEG to the load balancer;
  3. https://app.example.test/ (emulated DNS, emulator CA; Go client and curl) serves the bucket's page and the second request reports X-Cache-Status: hit;
  4. /api/health goes LB → Istio → app; a client without the LB certificate is refused;
  5. /api/work writes to GCS, inserts into Cloud SQL (Go connector, IAM auth) and publishes, using Workload Identity and no endpoint configuration;
  6. the bucket notification and the message arrive by push with a verified OIDC token;
  7. the pod reaches the internet through Cloud NAT, and not after nat_enabled=false;
  8. app_storage_access=false makes step 5 fail with PERMISSION_DENIED;
  9. urlMaps.invalidateCache on /* makes the next request a miss;
  10. tofu destroy leaves no containers (gcpemu status lists the instance's containers).
make e2e                          # = GCPEMU_NET_TESTS=1 go test -tags e2e ./e2e -run TestReferenceStack -timeout 30m -v
GCPEMU_NET_TESTS=0 make e2e       # offline-ish: steps 1, 3, 9 and 10 only

It needs a container runtime and tofu on PATH; tofu init downloads the google and tls providers. Steps 2 and 4–8 download Helm and the Istio release for its charts (both pinned and checksum-verified) and the Istio images and reach https://example.com/, so they only run with GCPEMU_NET_TESTS=1. Downloads are cached in $GCPEMU_E2E_CACHE (default <user cache dir>/gcpemu-e2e). The run must finish within 10 minutes (GCPEMU_E2E_BUDGET overrides); it prints per-step timings. With emulator_gateway empty the module targets real GCP (set project and domain).

Client compatibility (SRS 7.1)

make compat runs the real clients against a detached instance with only endpoint configuration: gcloud (storage, pubsub, iam, dns, compute load balancing and NAT, artifacts, sql, container), kubectl through gke-gcloud-auth-plugin, Helm, Docker, crane, ko, psql, the Cloud SQL Auth Proxy v2 (including automatic IAM authentication) and dig. gcloud (with the gke-gcloud-auth-plugin component), kubectl, dig and Docker come from PATH; Helm, crane, ko and the Auth Proxy are downloaded at pinned, checksum-verified versions.

OpenTofu acceptance (SRS 11.1, IF-001)

make tofu applies each module in compat/tofu/ (one per service area: IAM, Storage, Pub/Sub, DNS, VPC networking, load balancing and CDN, Certificate Manager, Cloud SQL, GKE, Artifact Registry), plans again expecting no changes, destroys it and checks the state is empty. It does this with the google and google-beta providers, each at the latest release of the current and the previous minor (looked up in the OpenTofu registry), against a detached instance whose provider block is gcpemu tofu-provider output. GCPEMU_TOFU_PROVIDERS narrows the matrix (google-beta, google@8.6.0, google@8.6.0,google-beta@8.5.0) and GCPEMU_TOFU_MODULES the modules (lb,dns). The resource types each module must declare are listed in compat/tofu_test.go; that list is the supported surface. It needs tofu on PATH and, for Cloud SQL and GKE, a container runtime.

The gcpemu tofu-provider block works for google-beta as well: rename it to provider "google-beta" and keep the /v1/ endpoints, since the emulator also serves the beta API versions the provider uses.

Pointing gcloud at an instance needs nothing beyond eval "$(gcpemu env)" plus a token: for example echo owner > /tmp/tok; export CLOUDSDK_AUTH_ACCESS_TOKEN_FILE=/tmp/tok. Registry clients log in to $GCPEMU_REGISTRY as oauth2accesstoken with gcloud auth print-access-token.

Development

make vet race      # gofmt, vet, tests with -race
make release       # static binaries for linux/darwin × amd64/arm64

Each service is an isolated package implementing emu.Service (internal/emu/emu.go); cross-service contracts live in internal/emu/xservice.go.

Licensed under Apache-2.0.

Directories

Path Synopsis
cmd
gcpemu command
Command gcpemu is a local emulator for Google Cloud services.
Command gcpemu is a local emulator for Google Cloud services.
Package compat is the client compatibility suite (SRS 7.1, IF-003 to IF-006 and IF-009): the real gcloud, kubectl with gke-gcloud-auth-plugin, Helm, Docker, crane, ko, psql, the Cloud SQL Auth Proxy v2 and dig run against a detached gcpemu instance with only endpoint configuration.
Package compat is the client compatibility suite (SRS 7.1, IF-003 to IF-006 and IF-009): the real gcloud, kubectl with gke-gcloud-auth-plugin, Helm, Docker, crane, ko, psql, the Cloud SQL Auth Proxy v2 and dig run against a detached gcpemu instance with only endpoint configuration.
e2e
Package e2e holds the SRS 11.2 reference stack acceptance test: one OpenTofu root module (stack/), a Go API (app/) and the test that drives them against an in-process emulator.
Package e2e holds the SRS 11.2 reference stack acceptance test: one OpenTofu root module (stack/), a Go API (app/) and the test that drives them against an in-process emulator.
app command
Command app is the Go API of the SRS 11.2 reference stack.
Command app is the Go API of the SRS 11.2 reference stack.
Package emutest starts an in-process gcpemu instance for Go tests (FR-CI-009).
Package emutest starts an in-process gcpemu instance for Go tests (FR-CI-009).
internal
admin
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`.
agent
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).
apierr
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).
ca
Package ca is the emulator's local certificate authority (Section 7.4).
Package ca is the emulator's local certificate authority (Section 7.4).
cli
Package cli implements the gcpemu command line (FR-CORE-001..007).
Package cli implements the gcpemu command line (FR-CORE-001..007).
clock
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).
config
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).
emu
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.
fault
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.
frontend
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).
gateway
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.
hostmode
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.
instance
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.
locations
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.
lro
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).
netplane
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).
project
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.
reqlog
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).
runtime
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.
store
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.
trust
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 services lists the service modules compiled into gcpemu.
Package services lists the service modules compiled into gcpemu.
ar
Package ar emulates Artifact Registry (SRS 5.3): the artifactregistry v1 control plane over gRPC and REST on the gateway, and an OCI Distribution v1.1 registry on its own port (default 5000).
Package ar emulates Artifact Registry (SRS 5.3): the artifactregistry v1 control plane over gRPC and REST on the gateway, and an OCI Distribution v1.1 registry on its own port (default 5000).
cdn
Package cdn emulates Cloud CDN (SRS 5.9): the HTTP cache the load balancer puts in front of CDN-enabled backend services and backend buckets.
Package cdn emulates Cloud CDN (SRS 5.9): the HTTP cache the load balancer puts in front of CDN-enabled backend services and backend buckets.
certs
Package certs emulates Certificate Manager (certificatemanager.googleapis.com v1) and the Network Security API (networksecurity.googleapis.com v1: backend authentication configs, server and client TLS policies) and provides emu.CertManager, the view of those resources the load balancer data plane consumes (FR-LB-004, FR-LB-006, FR-LB-009).
Package certs emulates Certificate Manager (certificatemanager.googleapis.com v1) and the Network Security API (networksecurity.googleapis.com v1: backend authentication configs, server and client TLS policies) and provides emu.CertManager, the view of those resources the load balancer data plane consumes (FR-LB-004, FR-LB-006, FR-LB-009).
compute
Package compute emulates the parts of compute.googleapis.com v1 the other services build on (SRS 1.2 supporting resources, 3.3, 5.10): regions and zones, projects.get, VPC networks, subnetworks, firewalls, routes, addresses, Cloud Routers with Cloud NAT (FR-NAT-001), zonal network endpoint groups (FR-GKE-008) and compute Operations (FR-CORE-023), plus the minimal servicenetworking.googleapis.com API that binds private services access ranges to a VPC.
Package compute emulates the parts of compute.googleapis.com v1 the other services build on (SRS 1.2 supporting resources, 3.3, 5.10): regions and zones, projects.get, VPC networks, subnetworks, firewalls, routes, addresses, Cloud Routers with Cloud NAT (FR-NAT-001), zonal network endpoint groups (FR-GKE-008) and compute Operations (FR-CORE-023), plus the minimal servicenetworking.googleapis.com API that binds private services access ranges to a VPC.
dns
Package dns emulates Cloud DNS (SRS 5.2): the dns.googleapis.com v1 REST control plane (managed zones, record sets, changes; FR-DNS-001/002) and an authoritative DNS data plane on UDP and TCP that answers from the stored zones and forwards other names to the host resolver (FR-DNS-003/004).
Package dns emulates Cloud DNS (SRS 5.2): the dns.googleapis.com v1 REST control plane (managed zones, record sets, changes; FR-DNS-001/002) and an authoritative DNS data plane on UDP and TCP that answers from the stored zones and forwards other names to the host resolver (FR-DNS-003/004).
gcs
Package gcs emulates Cloud Storage (SRS 5.4): the JSON API v1 (buckets, objects, uploads, notifications, IAM, HMAC keys), the XML API subset used by the official clients for reads and by S3-style tools, V4 signed URLs and POST policies, Pub/Sub notifications and lifecycle rules.
Package gcs emulates Cloud Storage (SRS 5.4): the JSON API v1 (buckets, objects, uploads, notifications, IAM, HMAC keys), the XML API subset used by the official clients for reads and by S3-style tools, V4 signed URLs and POST policies, Pub/Sub notifications and lifecycle rules.
gke
Package gke emulates Google Kubernetes Engine (SRS 5.7): the container.googleapis.com v1 API over gRPC and REST on the gateway, backed by real k3s clusters running in the host's container runtime.
Package gke emulates Google Kubernetes Engine (SRS 5.7): the container.googleapis.com v1 API over gRPC and REST on the gateway, backed by real k3s clusters running in the host's container runtime.
iam
Package iam emulates Identity and Access Management (SRS 5.1): service accounts and keys, predefined and custom roles, IAM policies on projects and resources with a shared policy evaluator, OAuth2 token issuance, the IAM Credentials API and a GCE-compatible metadata server.
Package iam emulates Identity and Access Management (SRS 5.1): service accounts and keys, predefined and custom roles, IAM policies on projects and resources with a shared policy evaluator, OAuth2 token issuance, the IAM Credentials API and a GCE-compatible metadata server.
lb
Package lb emulates the Application Load Balancer (SRS 5.8): the compute v1 load-balancing collections (forwarding rules, target HTTP(S) proxies, URL maps, backend services and buckets, health checks, SSL certificates and SSL policies, global and regional; FR-LB-001) served on the compute API, and a real in-process L7 proxy per forwarding rule wired exactly as GCP wires them: forwarding rule → target proxy → URL map → backend service or bucket → NEG endpoints (FR-LB-002..010).
Package lb emulates the Application Load Balancer (SRS 5.8): the compute v1 load-balancing collections (forwarding rules, target HTTP(S) proxies, URL maps, backend services and buckets, health checks, SSL certificates and SSL policies, global and regional; FR-LB-001) served on the compute API, and a real in-process L7 proxy per forwarding rule wired exactly as GCP wires them: forwarding rule → target proxy → URL map → backend service or bucket → NEG endpoints (FR-LB-002..010).
lb/urlmap
Package urlmap is the load balancer's URL map routing engine (FR-LB-003): a pure library that compiles a compute v1 UrlMap and selects, for a request, the backend (service or bucket), redirect, URL rewrite and header actions exactly as GCP's Application Load Balancers do:
Package urlmap is the load balancer's URL map routing engine (FR-LB-003): a pure library that compiles a compute v1 UrlMap and selects, for a request, the backend (service or bucket), redirect, URL rewrite and header actions exactly as GCP's Application Load Balancers do:
nat
Package nat is the Cloud NAT service module (SRS 5.10).
Package nat is the Cloud NAT service module (SRS 5.10).
pubsub
Package pubsub emulates Cloud Pub/Sub (SRS 5.5): topics, subscriptions, publish, pull, streaming pull and push delivery, ordering, dead-letter topics, filters, exactly-once delivery, snapshots, seek and schemas.
Package pubsub emulates Cloud Pub/Sub (SRS 5.5): topics, subscriptions, publish, pull, streaming pull and push delivery, ordering, dead-letter topics, filters, exactly-once delivery, snapshots, seek and schemas.
sql
Package sql emulates Cloud SQL for PostgreSQL (SRS 5.6).
Package sql emulates Cloud SQL for PostgreSQL (SRS 5.6).
sql/internal/genflags command
Command genflags generates Cloud SQL for PostgreSQL's database flag allow-list (FR-SQL-003) from Google's documentation:
Command genflags generates Cloud SQL for PostgreSQL's database flag allow-list (FR-SQL-003) from Google's documentation:
sql/proxy
Package proxy is the Cloud SQL in-container agent (FR-SQL-004..007).
Package proxy is the Cloud SQL in-container agent (FR-SQL-004..007).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL