transport

package
v2.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2015 License: Apache-2.0, Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialGRPC

func DialGRPC(ctx context.Context, opt ...cloud.ClientOption) (*grpc.ClientConn, error)

DialGRPC returns a GRPC connection for use communicating with a Google cloud service, configured with the given ClientOptions.

func NewHTTPClient

func NewHTTPClient(ctx context.Context, opt ...cloud.ClientOption) (*http.Client, string, error)

NewHTTPClient returns an HTTP client for use communicating with a Google cloud service, configured with the given ClientOptions. It also returns the endpoint for the service as specified in the options.

Types

type ErrHTTP

type ErrHTTP struct {
	StatusCode int
	Body       []byte
	// contains filtered or unexported fields
}

ErrHTTP is returned when on a non-200 HTTP response.

func (*ErrHTTP) Error

func (e *ErrHTTP) Error() string

type ProtoClient

type ProtoClient struct {
	// contains filtered or unexported fields
}

func NewProtoClient

func NewProtoClient(ctx context.Context, opt ...cloud.ClientOption) (*ProtoClient, error)

NewProtoClient returns a ProtoClient for communicating with a Google cloud service, configured with the given ClientOptions.

func (*ProtoClient) Call

func (c *ProtoClient) Call(ctx context.Context, method string, req, resp proto.Message) error

Jump to

Keyboard shortcuts

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