-
Notifications
You must be signed in to change notification settings - Fork 118
Add example on how to send an event as a client in cloud_run_event #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the issue. There are some examples in #23 but ultimately this is blocked on that issue -- the "correct" way would be with the emulator. |
You're welcome, thanks for pointing me there, I'm leaving a quick example here for people stumbling upon the issue
This is the way to send an event to the server: |
Indeed, it's missing documentation on how to call a function when the type is not {
"eventId": "test",
"timestamp": "2018-04-09T07:56:12.975Z",
"eventType": "google.pubsub.topic.publish",
"resource": "my-app",
"data": {
"data": "dGhpcyBpcyBkYXRhIG5vb2I=",
"attributes": {
"app": "my-app",
"version": "1.0.0"
}
}
} it returns
by doing simply with a function runned with: Please note that I may have found mismatch with the documentation here. For example, you have to pass Hope this helps and available for PR if needed 😃 |
Perhaps linking to https://cloud.google.com/functions/docs/running/calling#background_functions would be useful? |
As in the title, I searched like a crazy and found nothing, an example would be great
The text was updated successfully, but these errors were encountered: