HTTP Google Cloud Functions in Go

search share Dołącz Zaloguj się

HTTP Google Cloud Functions in Go

45 godz. Punkty: 5


Google Cloud Self-Paced Labs


Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

Cloud Functions is an event-driven serverless compute platform. Cloud Functions allows you to write your code without worrying about provisioning resources or scaling to handle changing requirements.

There are two types of Cloud Functions:

  • HTTP functions respond to HTTP requests. You'll build one in this codelab.
  • Background functions are triggered by events, like a message being published to Cloud Pub/Sub or a file being uploaded to Cloud Storage. We don't address this in this lab, but you can read more in the documentation.


This codelab will walk you through creating your own Google Cloud Function in Go.

What you will build

In this codelab, you will publish and Cloud Function that when invoked via HTTP will display an image of the Go gopher, designed by Renee French.


What you will learn

  • How to write an HTTP Cloud Function in Go.

  • How to test an HTTP Cloud Function in Go.

  • How to run a local Go HTTP server to try the function.

What you will need

  • A recent version of Go ( installation instructions). Go is already installed when using Cloud Shell.

  • The gcloud command line tool ( download page). This comes pre-installed and configured when using Cloud Shell.

  • A text editor, like the editor built into Cloud Shell

Dołącz do Qwiklabs, aby zapoznać się z resztą tego modułu i innymi materiałami.

  • Uzyskaj tymczasowy dostęp do Google Cloud Console.
  • Ponad 200 modułów z poziomów od początkującego do zaawansowanego.
  • Podzielono na części, więc można uczyć się we własnym tempie.
Dołącz, aby rozpocząć ten moduł