Skip to content

Google Cloud Functions

Sends each event as a json-encoded POST request to a Google Cloud Function. Use it to trigger custom serverless logic on GCP whenever a matching event appears on chain.

When authentication is enabled, the sink uses the standard Google Cloud credential chain to mint an identity token — no credentials go in the config. See Google Cloud credentials.

Configuration

daemon.toml
[sink]
type = "GcpCloudFunction"
url = "https://REGION-PROJECT_ID.cloudfunctions.net/FUNCTION_NAME"
timeout = 30000
authentication = true
[sink.headers]
extra_header_1 = "abc"
extra_header_2 = "123"
  • type (required): the literal value GcpCloudFunction.
  • url (required): your function’s URL.
  • timeout (optional, default = 30000): the HTTP response timeout, in milliseconds.
  • authentication (optional, default = false): when true, attaches a GCP identity token as the Authorization header.
  • headers (optional): a key-value map of extra headers to send with each call.