This page shows you how to create and deploy an event receiver service. The target service receives HTTP requests containing the event in the CloudEvents format.
Event providers (sources) can provide the following event types:
Event receiver response
Your receiver service should send an HTTP 2xx
response to signal a successful event receipt to the router. The router treats
all other HTTP responses as delivery failures and will resend the event.
Open source repository
The structure of the HTTP body for all events are available on the CloudEvents GitHub repository.
The repository contains the following to help you understand and use CloudEvents data in your programming language:
- Google Protocol Buffers for CloudEvents data payloads
- Generated JSON schemas
- A public JSON schema catalog
Links to client libraries are also included.
Use a CloudEvents SDK library
You can develop event receiver services using the CloudEvents SDK library, which is available for the following languages:
These libraries are open source and make it easier to transform your HTTP request into a language-idiomatic CloudEvents object.
Sample receiver source code
Cloud Audit Logs
The sample code shows you how to read Cloud Storage events using Cloud Audit Logs in a service deployed to Cloud Run.
Python
Java
Node.js
Go
C#
Pub/Sub
The sample code shows you how to read Pub/Sub events in a service deployed to Cloud Run.