GCP Cloud Functions
Google Cloud Functions source for walkerOS. Lightweight runtime adapter with plug-and-play assignment to a Cloud Functions handler, batch processing for multiple events per request, and configurable CORS. The @walkeros/server-source-gcp package also ships sourcePubSubPull and sourcePubSubPush for ingesting from Pub/Sub topics; this page covers the Cloud Functions handler only.
The GCP Cloud Functions source is a server source in the walkerOS flow:
It receives events via HTTP and forwards them to your destinations.
Installation
- Integrated
- Bundled
Add to your flow.json sources:
Server sources require platform-specific handlers. For containerized deployments, see Docker.
Configuration
This source uses the standard source config wrapper (consent, data, env, id, ...). For the shared fields see source configuration. Package-specific fields live under config.settings and are listed below.
Settings
| Property | Type | Description | More |
|---|---|---|---|
cors | boolean | object | CORS configuration: false = disabled, true = allow all origins, object = custom configuration | |
timeout | integer | Request timeout in milliseconds (max: 540000 for GCP) |
Mapping
This package does not define custom rule-level settings. For the standard rule fields (consent, condition, data, batch, name, policy) see mapping.
Examples
Order POST
A Cloud Function HTTP POST carrying an order payload becomes a walker order complete event.
POST event
A GCP Cloud Function HTTP POST with a JSON body becomes a single walker elb event.
Request format
Single event
Batch events
Ingest metadata
Extract request metadata and forward it through the pipeline.
config.ingest must use the map operator. Keys are output field names; values are direct field paths on the request scope (no req. prefix). A bare object like { ip: 'ip' } is silently inert: without the map operator the source passes the whole request through and no field is extracted.
Available ingest paths
| Path | Description |
|---|---|
ip | Client IP address |
headers.* | HTTP headers (user-agent, origin, etc.) |
method | HTTP method |
hostname | Request hostname |
Pub/Sub
The same @walkeros/server-source-gcp package also exports sourcePubSubPull (streaming pull subscriber) and sourcePubSubPush (HTTP webhook handler) for ingesting events from a Pub/Sub topic. See the Pub/Sub source page for full settings, lifecycle, decoders, OIDC verification, and setup reference.