package internal
import "github.com/docker/distribution/Godeps/_workspace/src/google.golang.org/cloud/internal"
Package internal provides support for the cloud packages.
Users should not import this package directly.
Index ¶
- func HTTPClient(ctx context.Context) *http.Client
- func ProjID(ctx context.Context) string
- func Service(ctx context.Context, name string, fill func(*http.Client) interface{}) interface{}
- func WithContext(parent context.Context, projID string, c *http.Client) context.Context
- type Transport
Functions ¶
func HTTPClient ¶
func ProjID ¶
func Service ¶
Service returns the result of the fill function if it's never been called before for the given name (which is assumed to be an API service name, like "datastore"). If it has already been cached, the fill func is not run. It's safe for concurrent use by multiple goroutines.
func WithContext ¶
Types ¶
type Transport ¶
type Transport struct { // Base represents the actual http.RoundTripper // the requests will be delegated to. Base http.RoundTripper }
Transport is an http.RoundTripper that appends Google Cloud client's user-agent to the original request's user-agent header.
func (*Transport) RoundTrip ¶
RoundTrip appends a user-agent to the existing user-agent header and delegates the request to the base http.RoundTripper.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Godeps/_workspace/src/google.golang.org/cloud/internal/datastore | Package datastore is a generated protocol buffer package. |
Godeps/_workspace/src/google.golang.org/cloud/internal/opts | Package opts holds the DialOpts struct, configurable by cloud.ClientOptions to set up transports for cloud packages. |
Godeps/_workspace/src/google.golang.org/cloud/internal/testutil | Package testutil contains helper functions for writing tests. |
Godeps/_workspace/src/google.golang.org/cloud/internal/transport |
- Version
- v2.3.0-rc.1+incompatible
- Published
- Jan 21, 2016
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 10 minutes ago –
Tools for package owners.