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 |
---|---|
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. |
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. |