You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open http://localhost:8080/ in your browser and see *Hello world!*.
138
138
139
-
Run the following command to run `hello_cloudevent` target locally:
139
+
Run the following command to run `hello_cloud_event` target locally:
140
140
141
141
```sh
142
-
functions-framework --target=hello_cloudevent
142
+
functions-framework --target=hello_cloud_event
143
143
```
144
144
145
-
More info on sending [CloudEvents](http://cloudevents.io) payloads, see [`examples/cloud_run_cloudevents`](examples/cloud_run_cloudevents/) instruction.
145
+
More info on sending [CloudEvents](http://cloudevents.io) payloads, see [`examples/cloud_run_cloud_events`](examples/cloud_run_cloud_events/) instruction.
146
146
147
147
148
148
### Quickstart: Error handling
@@ -358,11 +358,11 @@ See the [running example](examples/cloud_run_event).
358
358
359
359
## Enable CloudEvents
360
360
361
-
The Functions framework can also unmarshall incoming [CloudEvents](http://cloudevents.io) payloads to the `cloudevent` object. This will be passed as a [cloudevent](https://github.com/cloudevents/sdk-python) to your function when it receives a request. Note that your function must use the `cloudevents`-style function signature:
361
+
The Functions framework can also unmarshall incoming [CloudEvents](http://cloudevents.io) payloads to the `cloud_event` object. This will be passed as a [CloudEvent](https://github.com/cloudevents/sdk-python) to your function when it receives a request. Note that your function must use the `CloudEvents`-style function signature:
362
362
363
363
```python
364
-
defhello(cloudevent):
365
-
print(f"Received event with ID: {cloudevent['id']}")
364
+
defhello(cloud_event):
365
+
print(f"Received event with ID: {cloud_event['id']}")
366
366
```
367
367
368
368
To enable automatic unmarshalling, set the function signature type to `cloudevent` using the `--signature-type` command-line flag or the `FUNCTION_SIGNATURE_TYPE` environment variable. By default, the HTTP signature type will be used and automatic event unmarshalling will be disabled.
Copy file name to clipboardExpand all lines: examples/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
### Cloud Run
5
5
*[`cloud_run_http`](./cloud_run_http/) - Deploying an HTTP function to [Cloud Run](http://cloud.google.com/run) with the Functions Framework
6
6
*[`cloud_run_event`](./cloud_run_event/) - Deploying a CloudEvent function to [Cloud Run](http://cloud.google.com/run) with the Functions Framework
7
-
*[`cloud_run_cloudevents`](./cloud_run_cloudevents/) - Deploying a [CloudEvent](https://github.com/cloudevents/sdk-python) function to [Cloud Run](http://cloud.google.com/run) with the Functions Framework
7
+
*[`cloud_run_cloud_events`](cloud_run_cloud_events/) - Deploying a [CloudEvent](https://github.com/cloudevents/sdk-python) function to [Cloud Run](http://cloud.google.com/run) with the Functions Framework
0 commit comments