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 ¶
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. |