Documentation
¶
Overview ¶
Package cloudfunctions serves the Cloud Functions v1 REST API, so real gcloud and the GCP SDKs can drive the emulator.
v1 rather than v2 for one reason: v1 is the only generation with an invoke method. A v2 function is a Cloud Run service, called at its own URL with an identity token, so a v2-only emulator can store function metadata but can never run one.
Index ¶
Constants ¶
const UploadPath = "/_emu/upload"
UploadPath is where generateUploadUrl points a client.
Real GCF hands out a signed GCS URL. cloudrig hands out one of its own: the emulator controls the address it returns, so the source can land here without a bucket, an object store, or a signature to verify.
Variables ¶
var Prefixes = []string{"/v1/", "/v2/", UploadPath + "/"}
Prefixes are the path prefixes this service claims.
v2 is here for a single endpoint: gcloud validates --runtime against /v2/{parent}/runtimes even when deploying a gen1 function.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the v1 API over a function registry. It holds no state of its own beyond operations: the registry is the single source of truth, so the API and the runner cannot drift apart.