internal

package
v0.90.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

README

Internal

This directory contains internal code for cloud.google.com/go packages.

.repo-metadata-full.json

.repo-metadata-full.json contains metadata about the packages in this repo. It is generated by internal/gapicgen/generator. It's processed by external tools to build lists of all of the packages.

Don't make breaking changes to the format without consulting with the external tools.

One day, we may want to create individual .repo-metadata.json files next to each package, which is the pattern followed by some other languages. External tools would then talk to pkg.go.dev or some other service to get the overall list of packages and use the .repo-metadata.json files to get the additional metadata required. For now, .repo-metadata-full.json includes everything.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Annotate added in v0.17.0

func Annotate(err error, msg string) error

Annotate prepends msg to the error message in err, attempting to preserve other information in err, like an error code.

Annotate panics if err is nil.

Annotate knows about these error types: - "google.golang.org/grpc/status".Status - "google.golang.org/api/googleapi".Error If the error is not one of these types, Annotate behaves like

fmt.Errorf("%s: %v", msg, err)

func Annotatef added in v0.17.0

func Annotatef(err error, format string, args ...interface{}) error

Annotatef uses format and args to format a string, then calls Annotate.

func Retry added in v0.5.0

func Retry(ctx context.Context, bo gax.Backoff, f func() (stop bool, err error)) error

Retry calls the supplied function f repeatedly according to the provided backoff parameters. It returns when one of the following occurs: When f's first return value is true, Retry immediately returns with f's second return value. When the provided context is done, Retry returns with an error that includes both ctx.Error() and the last error returned by f.

Types

This section is empty.

Directories

Path Synopsis
aliasfix module
aliasgen module
Package btree implements in-memory B-Trees of arbitrary degree.
Package btree implements in-memory B-Trees of arbitrary degree.
examples
fake Module
mock Module
Package fields provides a view of the fields of a struct that follows the Go rules, amended to consider tags and case insensitivity.
Package fields provides a view of the fields of a struct that follows the Go rules, amended to consider tags and case insensitivity.
gapicgen module
gensnippets module
godocfx module
Package leakcheck contains functions to check leaked goroutines.
Package leakcheck contains functions to check leaked goroutines.
Package optional provides versions of primitive types that can be nil.
Package optional provides versions of primitive types that can be nil.
Package pretty implements a simple pretty-printer.
Package pretty implements a simple pretty-printer.
Package protostruct supports operations on the protocol buffer Struct message.
Package protostruct supports operations on the protocol buffer Struct message.
Package testutil contains helper functions for writing tests.
Package testutil contains helper functions for writing tests.
Package tracecontext provides encoders and decoders for Stackdriver Trace contexts.
Package tracecontext provides encoders and decoders for Stackdriver Trace contexts.
Package uid supports generating unique IDs.
Package uid supports generating unique IDs.
Package version contains version information for Google Cloud Client Libraries for Go, as reported in request headers.
Package version contains version information for Google Cloud Client Libraries for Go, as reported in request headers.

Jump to

Keyboard shortcuts

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