transport

package
v1.3.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2016 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