Skip to content

Services Overview

floci-gcp emulates GCP services on a single port (4588). All services use real GCP wire protocols — your existing GCP SDK calls and gcloud CLI commands work without modification.

Service Matrix

Service Protocol Endpoint
Cloud Storage (GCS) REST XML (objects) + REST JSON (management) /{bucket}/{object}, /storage/v1/b/{bucket}
Pub/Sub gRPC google.pubsub.v1.Publisher, google.pubsub.v1.Subscriber
Firestore gRPC google.firestore.v1.Firestore
Datastore HTTP/protobuf /v1/projects/{project}:{method}
Secret Manager gRPC google.cloud.secretmanager.v1.SecretManagerService
Cloud Logging gRPC + REST JSON google.logging.v2.LoggingServiceV2, /v2/entries:write, /v2/entries:list
Cloud KMS gRPC + REST JSON google.cloud.kms.v1.KeyManagementService, /v1/projects/{project}/locations/{location}/keyRings
IAM REST JSON /v1/projects/{project}/serviceAccounts
Managed Kafka REST JSON /v1/projects/{project}/locations/{location}/clusters
GKE (Kubernetes Engine) REST JSON container.* host or /container/v1/projects/{project}/locations/{location}/clusters
Cloud SQL for PostgreSQL REST JSON /v1/projects/{project}/instances
Cloud Run REST JSON /v2/projects/{project}/locations/{location}/services
Cloud Functions REST JSON /v2/projects/{project}/locations/{location}/functions
Cloud Tasks gRPC google.cloud.tasks.v2.CloudTasks
Cloud Scheduler gRPC + REST JSON google.cloud.scheduler.v1.CloudScheduler, /v1/projects/{project}/locations/{location}/jobs
Cloud Monitoring gRPC + REST JSON google.monitoring.v3.MetricService, /v3/projects/{project}
Service Usage REST JSON /v1/projects/{project}/services (+ minimal Resource Manager /v1/projects/{projectId})
Firebase Auth REST JSON /identitytoolkit.googleapis.com/v1/accounts:*, /securetoken.googleapis.com/v1/token
BigQuery (Phase 1) REST JSON /bigquery/v2/projects/{project}

Single-Port Design

All services — gRPC and REST — are available on port 4588 via ALPN negotiation:

  • http2=true — enables HTTP/2 support
  • grpc.server.use-separate-server=false — gRPC and REST share the same port

Clients using plain HTTP/1.1 are served REST endpoints. Clients using HTTP/2 (gRPC) are served gRPC endpoints. No separate ports or proxy configuration is required.

Common Setup

Before calling any service, set the appropriate emulator environment variable:

export PUBSUB_EMULATOR_HOST=localhost:4588
export FIRESTORE_EMULATOR_HOST=localhost:4588
export DATASTORE_EMULATOR_HOST=localhost:4588
export STORAGE_EMULATOR_HOST=http://localhost:4588
export SECRET_MANAGER_EMULATOR_HOST=localhost:4588

GCP SDKs automatically bypass credential validation when these variables are set. Some REST management SDKs, including Cloud Run and Cloud Functions, do not have emulator environment variables; configure their client endpoint explicitly as http://localhost:4588 and use no credentials.

For gcloud CLI:

gcloud config set project floci-local

Auth Bypass

floci-gcp does not validate credentials. All requests are accepted unconditionally. This matches the behavior of GCP official emulators when *_EMULATOR_HOST is set.

Multi-Project Isolation

All resources are namespaced by GCP project ID. Resources in project-a are invisible to project-b. See Multi-Project Isolation.