cloud

package module
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2018 License: Apache-2.0 Imports: 0 Imported by: 0

README

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:

Installation instructions

go get github.com/google/go-cloud
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

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
  • Variables that change at runtime (configuration)
  • Connecting to MySQL databases
  • Server startup and diagnostics: request logging, tracing, and health checking

Contributing

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.

Community

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

This project is covered by the Go Code of Conduct.

Documentation

Overview

Package cloud contains a library and tools for open cloud development in Go.

The Go Cloud Project allows 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.

At the core of the project are common types implemented by cloud providers. For example, the blob.Bucket type can be created using gcsblob.OpenBucket, s3blob.OpenBucket, or any other provider. Then, the blob.Bucket can be used throughout your application without worrying about the underlying implementation.

This project works well with a code generator called Wire (https://github.com/google/wire/blob/master/README.md). 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.

For sample applications and a tutorial, see the samples directory (https://github.com/google/go-cloud/tree/master/samples).

Directories

Path Synopsis
aws
Package aws provides fundamental Wire providers for Amazon Web Services (AWS).
Package aws provides fundamental Wire providers for Amazon Web Services (AWS).
awscloud
Package awscloud contains Wire providers for AWS services.
Package awscloud contains Wire providers for AWS services.
rds
Package rds contains Wire providers that are common across RDS.
Package rds contains Wire providers that are common across RDS.
Package blob provides an easy and portable way to interact with blobs within a storage location, hereafter called a "bucket".
Package blob provides an easy and portable way to interact with blobs within a storage location, hereafter called a "bucket".
driver
Package driver defines a set of interfaces that the blob package uses to interact with the underlying blob services.
Package driver defines a set of interfaces that the blob package uses to interact with the underlying blob services.
drivertest
Package drivertest provides a conformance test for implementations of driver.
Package drivertest provides a conformance test for implementations of driver.
fileblob
Package fileblob provides a blob implementation that uses the filesystem.
Package fileblob provides a blob implementation that uses the filesystem.
gcsblob
Package gcsblob provides a blob implementation that uses GCS.
Package gcsblob provides a blob implementation that uses GCS.
s3blob
Package s3blob provides a blob implementation that uses S3.
Package s3blob provides a blob implementation that uses S3.
gcp
Package gcp provides fundamental Wire providers and types for Google Cloud Platform (GCP).
Package gcp provides fundamental Wire providers and types for Google Cloud Platform (GCP).
cloudsql
Package cloudsql contains Wire providers that are common across Google Cloud SQL.
Package cloudsql contains Wire providers that are common across Google Cloud SQL.
gcpcloud
Package gcpcloud contains Wire providers for GCP services.
Package gcpcloud contains Wire providers for GCP services.
Package health provides health check handlers.
Package health provides health check handlers.
sqlhealth
Package sqlhealth provides a health check for a SQL database connection.
Package sqlhealth provides a health check for a SQL database connection.
internal
batcher
Package batcher supports batching of items.
Package batcher supports batching of items.
pubsub
Package pubsub provides an easy and portable way to interact with publish/ subscribe systems.
Package pubsub provides an easy and portable way to interact with publish/ subscribe systems.
pubsub/driver
Package driver defines a set of interfaces that the pubsub package uses to interact with the underlying pubsub services.
Package driver defines a set of interfaces that the pubsub package uses to interact with the underlying pubsub services.
pubsub/drivertest
Package drivertest provides a conformance test for implementations of driver.
Package drivertest provides a conformance test for implementations of driver.
pubsub/gcppubsub
Package gcppubsub provides an implementation of pubsub that uses GCP PubSub.
Package gcppubsub provides an implementation of pubsub that uses GCP PubSub.
pubsub/mempubsub
Package mempubsub provides an in-memory pubsub implementation.
Package mempubsub provides an in-memory pubsub implementation.
pubsub/rabbitpubsub
Package rabbitpubsub provides a pubsub driver for RabbitMQ.
Package rabbitpubsub provides a pubsub driver for RabbitMQ.
retry
Package retry provides retry logic.
Package retry provides retry logic.
secrets/driver
Package driver defines interfaces to be implemented for providers of the secrets package.
Package driver defines interfaces to be implemented for providers of the secrets package.
secrets/drivertest
Package drivertest provides a conformance test for implementations of the secrets driver.
Package drivertest provides a conformance test for implementations of the secrets driver.
secrets/localsecrets
Package localsecrets provides a way to encrypt and decrypt small messages without making network calls to a third party service.
Package localsecrets provides a way to encrypt and decrypt small messages without making network calls to a third party service.
testing/replay
Package replay provides the ability to record and replay HTTP requests.
Package replay provides the ability to record and replay HTTP requests.
testing/terraform
Package terraform provides a function to read Terraform output.
Package terraform provides a function to read Terraform output.
contributebot Module
mysql
cloudmysql
Package cloudmysql provides connections to managed MySQL Cloud SQL instances.
Package cloudmysql provides connections to managed MySQL Cloud SQL instances.
rdsmysql
Package rdsmysql provides connections to AWS RDS MySQL instances.
Package rdsmysql provides connections to AWS RDS MySQL instances.
postgres
cloudpostgres
Package cloudpostgres provides connections to managed PostgreSQL Cloud SQL instances.
Package cloudpostgres provides connections to managed PostgreSQL Cloud SQL instances.
rdspostgres
Package rdspostgres provides connections to AWS RDS PostgreSQL instances.
Package rdspostgres provides connections to AWS RDS PostgreSQL instances.
Package requestlog provides an http.Handler that logs information about requests.
Package requestlog provides an http.Handler that logs information about requests.
Package runtimevar provides an interface for reading runtime variables and ability to detect changes and get updates on those variables.
Package runtimevar provides an interface for reading runtime variables and ability to detect changes and get updates on those variables.
constantvar
Package constantvar provides a runtimevar.Driver implementation for variables that never change.
Package constantvar provides a runtimevar.Driver implementation for variables that never change.
driver
Package driver provides the interface for providers of runtimevar.
Package driver provides the interface for providers of runtimevar.
drivertest
Package drivertest provides a conformance test for implementations of runtimevar.
Package drivertest provides a conformance test for implementations of runtimevar.
etcdvar
Package etcdvar provides a runtimevar.Driver implementation to read variables from etcd.
Package etcdvar provides a runtimevar.Driver implementation to read variables from etcd.
filevar
Package filevar provides a runtimevar.Driver implementation that reads variables from local files.
Package filevar provides a runtimevar.Driver implementation that reads variables from local files.
filevar/_demo
This binary demonstrates watching over a configuration file using the runtimevar package with the filevar package as the driver implementation.
This binary demonstrates watching over a configuration file using the runtimevar package with the filevar package as the driver implementation.
paramstore
Package paramstore provides a runtimevar.Driver implementation that reads variables from AWS Systems Manager Parameter Store.
Package paramstore provides a runtimevar.Driver implementation that reads variables from AWS Systems Manager Parameter Store.
runtimeconfigurator
Package runtimeconfigurator provides a runtimevar.Driver implementation that reads variables from GCP Cloud Runtime Configurator.
Package runtimeconfigurator provides a runtimevar.Driver implementation that reads variables from GCP Cloud Runtime Configurator.
samples
guestbook
guestbook is a sample application that records visitors' messages, displays a cloud banner, and an administrative message.
guestbook is a sample application that records visitors' messages, displays a cloud banner, and an administrative message.
guestbook/aws/provision_db
The provision_db program connects to an RDS database and initializes it with SQL from stdin.
The provision_db program connects to an RDS database and initializes it with SQL from stdin.
guestbook/gcp/deploy
The deploy program builds the Guestbook server locally and deploys it to GKE.
The deploy program builds the Guestbook server locally and deploys it to GKE.
guestbook/gcp/provision_db
The provision_db program connects to a Cloud SQL database and initializes it with SQL from a file.
The provision_db program connects to a Cloud SQL database and initializes it with SQL from a file.
tutorial
Command upload saves files to blob storage on GCP and AWS.
Command upload saves files to blob storage on GCP and AWS.
Package server provides a preconfigured HTTP server with diagnostic hooks.
Package server provides a preconfigured HTTP server with diagnostic hooks.
driver
Package driver defines an interface for custom HTTP listeners.
Package driver defines an interface for custom HTTP listeners.
sdserver
Package sdserver provides the diagnostic hooks for a server using Stackdriver.
Package sdserver provides the diagnostic hooks for a server using Stackdriver.
xrayserver
Package xrayserver provides the diagnostic hooks for a server using AWS X-Ray.
Package xrayserver provides the diagnostic hooks for a server using AWS X-Ray.
tests
gcp/app
The app command is a test app that is initialized with the GCP SDK.
The app command is a test app that is initialized with the GCP SDK.
internal/testutil
Package testutil contains utility functions used by server tests against different platforms.
Package testutil contains utility functions used by server tests against different platforms.
Package wire is the deprecated package for Wire code generation directives.
Package wire is the deprecated package for Wire code generation directives.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL