api

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2018 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package api provides functions to trace the google.golang.org/api package.

Example
Output:

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(options ...Option) (*http.Client, error)

NewClient creates a new oauth http client suitable for use with the google APIs with all requests traced automatically.

func WrapRoundTripper

func WrapRoundTripper(transport http.RoundTripper, options ...Option) http.RoundTripper

WrapRoundTripper wraps a RoundTripper intended for interfacing with Google APIs and traces all requests.

Types

type Option

type Option func(*config)

An Option customizes the config.

func WithContext

func WithContext(ctx context.Context) Option

WithContext sets the context in the config. This can be used to set span parents or pass a context through to the underlying client constructor.

func WithScopes

func WithScopes(scopes ...string) Option

WithScopes sets the scopes used to create the oauth2 config for Google APIs.

func WithServiceName

func WithServiceName(serviceName string) Option

WithServiceName sets the service name in the config. The default service name is inferred from the API definitions based on the http request route.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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