You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

80 lines
2.9 KiB

  1. // Copyright 2014 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. /*
  15. Package cloud is the root of the packages used to access Google Cloud
  16. Services. See https://godoc.org/cloud.google.com/go for a full list
  17. of sub-packages.
  18. Client Options
  19. All clients in sub-packages are configurable via client options. These options are
  20. described here: https://godoc.org/google.golang.org/api/option.
  21. Authentication and Authorization
  22. All the clients in sub-packages support authentication via Google Application Default
  23. Credentials (see https://cloud.google.com/docs/authentication/production), or
  24. by providing a JSON key file for a Service Account. See the authentication examples
  25. in this package for details.
  26. Timeouts and Cancellation
  27. By default, all requests in sub-packages will run indefinitely, retrying on transient
  28. errors when correctness allows. To set timeouts or arrange for cancellation, use
  29. contexts. See the examples for details.
  30. Do not attempt to control the initial connection (dialing) of a service by setting a
  31. timeout on the context passed to NewClient. Dialing is non-blocking, so timeouts
  32. would be ineffective and would only interfere with credential refreshing, which uses
  33. the same context.
  34. Connection Pooling
  35. Connection pooling differs in clients based on their transport. Cloud
  36. clients either rely on HTTP or gRPC transports to communicate
  37. with Google Cloud.
  38. Cloud clients that use HTTP (bigquery, compute, storage, and translate) rely on the
  39. underlying HTTP transport to cache connections for later re-use. These are cached to
  40. the default http.MaxIdleConns and http.MaxIdleConnsPerHost settings in
  41. http.DefaultTransport.
  42. For gRPC clients (all others in this repo), connection pooling is configurable. Users
  43. of cloud client libraries may specify option.WithGRPCConnectionPool(n) as a client
  44. option to NewClient calls. This configures the underlying gRPC connections to be
  45. pooled and addressed in a round robin fashion.
  46. Using the Libraries with Docker
  47. Minimal docker images like Alpine lack CA certificates. This causes RPCs to appear to
  48. hang, because gRPC retries indefinitely. See https://github.com/googleapis/google-cloud-go/issues/928
  49. for more information.
  50. Debugging
  51. To see gRPC logs, set the environment variable GRPC_GO_LOG_SEVERITY_LEVEL. See
  52. https://godoc.org/google.golang.org/grpc/grpclog for more information.
  53. For HTTP logging, set the GODEBUG environment variable to "http2debug=1" or "http2debug=2".
  54. */
  55. package cloud // import "cloud.google.com/go"