gcp

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package gcp assembles CloudEmu's GCP-compatible HTTP server.

New takes a Drivers bundle and returns a *server.Server preloaded with the handler for each non-nil driver. Consumers that want a single service can skip this package and register the handler directly on their own server.Server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(d Drivers) *server.Server

New returns a server that speaks GCP's REST JSON wire protocol for every non-nil driver in d.

GCS's Matches() also accepts /{bucket}/{object} for direct-media downloads, which is broad enough to swallow Firestore and Cloud Monitoring traffic if it registers first. Register more-specific handlers (compute, networks, firestore, monitoring) ahead of GCS so first-match-wins keeps each on the correct package.

Types

type Drivers

type Drivers struct {
	Compute        computedriver.Compute
	Storage        storagedriver.Bucket
	Firestore      dbdriver.Database
	Networking     netdriver.Networking
	Monitoring     mondriver.Monitoring
	CloudFunctions sdrv.Serverless
	PubSub         mqdriver.MessageQueue
	CloudSQL       rdbdriver.RelationalDB
	GKE            *gkeprov.Mock
	// K8sAPI is the shared in-memory Kubernetes data-plane API server. It is
	// shared with awsserver.Drivers.K8sAPI and azureserver.Drivers.K8sAPI so a
	// kubeconfig issued by any provider's control plane (EKS/AKS/GKE) reaches
	// the same backend. Leave nil to disable Kubernetes data-plane support.
	K8sAPI *kubernetes.APIServer
}

Drivers bundles the driver interfaces the GCP server can expose.

Directories

Path Synopsis
Package cloudfunctions implements the GCP Cloud Functions v1 REST API as a server.Handler.
Package cloudfunctions implements the GCP Cloud Functions v1 REST API as a server.Handler.
Package cloudsql implements the GCP Cloud SQL Admin REST API as a server.Handler.
Package cloudsql implements the GCP Cloud SQL Admin REST API as a server.Handler.
Package compute serves GCP Compute Engine REST API requests against a CloudEmu compute driver.
Package compute serves GCP Compute Engine REST API requests against a CloudEmu compute driver.
Package firestore implements the GCP Firestore REST API as a server.Handler.
Package firestore implements the GCP Firestore REST API as a server.Handler.
Package gcs implements the Google Cloud Storage JSON REST API as a server.Handler.
Package gcs implements the Google Cloud Storage JSON REST API as a server.Handler.
Package gke implements the GCP Kubernetes Engine (Container) API as a server.Handler.
Package gke implements the GCP Kubernetes Engine (Container) API as a server.Handler.
Package monitoring implements the GCP Cloud Monitoring REST API surface for alert policies.
Package monitoring implements the GCP Cloud Monitoring REST API surface for alert policies.
Package networks implements the GCP Compute Engine networking REST API (networks, subnetworks, firewalls) against a CloudEmu networking driver.
Package networks implements the GCP Compute Engine networking REST API (networks, subnetworks, firewalls) against a CloudEmu networking driver.
Package pubsub implements the GCP Pub/Sub v1 REST API as a server.Handler.
Package pubsub implements the GCP Pub/Sub v1 REST API as a server.Handler.

Jump to

Keyboard shortcuts

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