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 also provides a code generator called Wire (https://github.com/Lioric/go-cloud/blob/master/wire/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/Lioric/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. |
Package blob provides an easy way to interact with Blob objects within a bucket.
|
Package blob provides an easy way to interact with Blob objects within 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 bucket implementation that operates on the local filesystem.
|
Package fileblob provides a bucket implementation that operates on the local filesystem. |
gcsblob
Package gcsblob provides an implementation of using blob API on GCS.
|
Package gcsblob provides an implementation of using blob API on GCS. |
s3blob
Package s3blob provides an implementation of using blob API on S3.
|
Package s3blob provides an implementation of using blob API on S3. |
sqlfileblob
Package fileblob provides a bucket implementation that operates on the local filesystem.
|
Package fileblob provides a bucket implementation that operates on the local filesystem. |
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). |
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
|
|
testing/replay
Package replay provides the ability to record and replay HTTP requests.
|
Package replay provides the ability to record and replay HTTP requests. |
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. |
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. |
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. |
filevar
Package filevar provides a runtimevar driver implementation to read configurations and ability to detect changes and get updates on local configuration files.
|
Package filevar provides a runtimevar driver implementation to read configurations and ability to detect changes and get updates on local configuration 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. |
internal
Package internal contains helper methods that shouldn't be part of the public API, but have to be exposed as they are required across runtimevar/ package boundaries.
|
Package internal contains helper methods that shouldn't be part of the public API, but have to be exposed as they are required across runtimevar/ package boundaries. |
paramstore
Package paramstore reads parameters to the AWS Systems Manager Parameter Store.
|
Package paramstore reads parameters to the AWS Systems Manager Parameter Store. |
runtimeconfigurator
Package runtimeconfigurator provides a runtimevar driver implementation to read configurations from Cloud Runtime Configurator service and ability to detect changes and get updates.
|
Package runtimeconfigurator provides a runtimevar driver implementation to read configurations from Cloud Runtime Configurator service and ability to detect changes and get updates. |
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. |
wire
The greeter binary simulates an event with greeters greeting guests.
|
The greeter binary simulates an event with greeters greeting guests. |
Package server provides a preconfigured HTTP server with diagnostic hooks.
|
Package server provides a preconfigured HTTP server with diagnostic hooks. |
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 contains directives for Wire code generation.
|
Package wire contains directives for Wire code generation. |
cmd/wire
Wire is a compile-time dependency injection tool.
|
Wire is a compile-time dependency injection tool. |
internal/wire
Package wire provides compile-time dependency injection logic as a Go library.
|
Package wire provides compile-time dependency injection logic as a Go library. |