Cached library
HTTP Cloud Function that uses a cached client library instance to reduce the number of connections required per function invocation.
View in documentation
Cloud Storage Hello World
Shows a Storage Cloud Function sample.
Cloud Storage integration tests
Demonstrates how to integration test a function triggered by Cloud Storage.
View in documentation
Cloud Storage system tests
Demonstrates how to system test a function triggered by Cloud Storage.
View in documentation
Cloud Storage unit tests
Demonstrates how to unit test a function triggered by Cloud Storage.
View in documentation
Execution after HTTP response
Example of code that won't execute after an HTTP response is sent.
View in documentation
Global versus function scope
Creates a heavy object only once per function instance, and shares it across all function invocations reaching the given instance.
View in documentation
HTTP Hello World - Get
Function that prints "Hello world!" in response to a GET request.
View in documentation
OCR tutorial step 1 - Process image
Demonstrates how to upload image files to Cloud Storage, and extract and translate text from the images by using the Vision API and Translation API.
View in documentation
OCR tutorial step 2 - Detect text
Demonstrates how to upload image files to Cloud Storage, and extract and translate text from the images by using the Vision API and Translation API.
View in documentation
OCR tutorial step 3 - Translate text
Demonstrates how to upload image files to Cloud Storage, and extract and translate text from the images by using the Vision API and Translation API.
View in documentation
OCR tutorial step 4 - Save result
Demonstrates how to upload image files to Cloud Storage, and extract and translate text from the images by using the Vision API and Translation API.
View in documentation
View in documentation
Pub/Sub integration tests
Demonstrates how to integration test a function triggered by Pub/Sub.
View in documentation
Pub/Sub parse message
Demonstrates how to interact with Pub/Sub from Cloud Functions.
View in documentation
Pub/Sub system tests
Demonstrates how to system test a function triggered by Pub/Sub.
View in documentation
Pub/Sub unit tests
Demonstrates how to unit test a function triggered by Pub/Sub.
View in documentation
Use HTTP connection pooling
Shows how to recycle HTTP connections using HTTP connection pools.
View in documentation