A library and tools for open cloud development in Go.
Clone or download
jba blob: add tracing (#1143)
* blob: add tracing

Add tracing to methods that (a) make RPCs to the service, and (b) are
unlikely to be called in an inner loop. Specifically, do NOT trace:

- SignedURL, because it doesn't make an RPC
- Read and Write, because they are likely to be called frequently,
  so the trace information would be voluminous.
Latest commit a52ca32 Jan 20, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github github: retry issue and pull request templates (#539) Oct 12, 2018
aws runtimevar: drop Client types in favor of direct constructors (#976) Dec 17, 2018
azure/azurecloud azure: rework azureblob constructors and make them usable via Wire (#… Jan 14, 2019
blob blob: add tracing (#1143) Jan 20, 2019
gcp runtimevar: drop Client types in favor of direct constructors (#976) Dec 17, 2018
health all: change import paths (#955) Dec 13, 2018
internal internal/testing/octest: test support for OpenCensus (#1141) Jan 18, 2019
mysql all: change import paths (#955) Dec 13, 2018
postgres postgres/cloudpostgres: remove sentence about password being empty (#… Jan 10, 2019
pubsub pubsub: add tracing (#1136) Jan 18, 2019
requestlog all: change import paths (#955) Dec 13, 2018
runtimevar runtimevar: add tracing (#1142) Jan 18, 2019
samples move gcmsg from pubsub/samples/ to samples/ (#1137) Jan 17, 2019
secrets secrets: add tracing (#1138) Jan 18, 2019
server all: make the User-Agent we sent to GCP include the api name (#1022) Dec 20, 2018
tests all: update remaining references to gocloud.dev (#959) Dec 13, 2018
wire wire: add back README.md (#968) Dec 14, 2018
.gitignore internal/contributebot: update readme's deployment steps (#444) Sep 14, 2018
.travis.yml travis: disable windows builds for now instead of allowing them to fa… Jan 7, 2019
AUTHORS docs: add Vishal to CONTRIBUTORS and AUTHORS (#1052) Jan 4, 2019
CODE_OF_CONDUCT.md CODE_OF_CONDUCT: add notice (#79) Jun 8, 2018
CONTRIBUTING.md CONTRIBUTING: update code review workflow and contributions for frequ… Nov 28, 2018
CONTRIBUTORS docs: add Vishal to CONTRIBUTORS and AUTHORS (#1052) Jan 4, 2019
LICENSE Initial commit Mar 21, 2018
README.md doc: update readme to indicate you should cd into your project dir be… Jan 15, 2019
doc.go all: change import paths (#955) Dec 13, 2018
go.mod pubsub: add gcmsg sample command (#1016) Jan 8, 2019
go.sum pubsub: add gcmsg sample command (#1016) Jan 8, 2019
logo-gopherblue.png README: add logo (#537) Oct 12, 2018


The Go Cloud Project

Write once, run on any cloud ☁️

Build Status godoc Coverage Status

The Go Cloud Project is an initiative that will allow application developers to seamlessly deploy cloud applications on any combination of cloud providers. It does this by providing stable, idiomatic interfaces for common uses like storage and databases. Think database/sql for cloud products.

Imagine writing this to read from blob storage (like Google Cloud Storage or S3):

blobReader, err := bucket.NewReader(context.Background(), "my-blob", nil)

and being able to run that code on any cloud you want, avoiding all the ceremony of cloud-specific authorization, tracing, SDKs and all the other code required to make an application portable across cloud platforms.

The project works well with a code generator called Wire. It creates human-readable code that only imports the cloud SDKs for providers you use. This allows Go Cloud to grow to support any number of cloud providers, without increasing compile times or binary sizes, and avoiding any side effects from init() functions.

You can learn more about the project from our announcement blog post, or our talk at Next 2018:

Video: Building Go Applications for the Open Cloud (Cloud Next '18)

Installation instructions

# First "cd" into your project directory if you have one to ensure "go get" uses
# Go modules (or not) appropriately. See "go help modules" for more info.
go get gocloud.dev
go get github.com/google/wire/cmd/wire

Go Cloud builds at the latest stable release of Go. Previous Go versions may compile but are not supported.


samples/tutorial shows how to get started with the project by using blob storage.

samples/guestbook contains an example guestbook application (just like it's 1999!) that can be run locally, on Google Cloud Platform or on Amazon Web Services. The instructions take about 5 minutes to follow if running locally. If you want to see the guestbook app running on cloud resources, it will take about 30 minutes to follow, and uses Terraform to automatically provision the resources needed.

Project status

This project is in alpha and is not yet suitable for production.

While in alpha, the API is subject to breaking changes.

Current features

Go Cloud provides generic APIs for:

  • Unstructured binary (blob) storage
  • Publish/Subscribe (pubsub)
  • Variables that change at runtime (configuration)
  • Connecting to MySQL databases
  • Server startup and diagnostics: request logging, tracing, and health checking


Thank you for your interest in contributing to Go Cloud! ❤️

Everyone is welcome to contribute to Go Cloud, whether it's in the form of code, documentation, bug reports, feature requests, or anything else. We encourage you to experiment with Go Cloud and make contributions to help evolve it to meet your needs!

The GitHub repository at google/go-cloud currently contains Google Cloud Platform and Amazon Web Services implementations as examples to prove everything is working. Unfortunately, we cannot support every cloud provider directly from the project.

If you create a repository that implements the Go Cloud interfaces for other cloud providers, let us know! We would be happy to link to it here and give you a heads-up before making any breaking changes.

See the contributing guide for more details.


You can contact us on the go-cloud mailing list.

This project is covered by the Go Code of Conduct.