grpcutil

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsClosedConnection

func IsClosedConnection(err error) bool

IsClosedConnection returns true if err's Cause is an error produced by gRPC on closed connections.

func IsLocalRequestContext

func IsLocalRequestContext(ctx context.Context) bool

IsLocalRequestContext returns true if this context is marked for local (in-process) use.

func NewLocalRequestContext

func NewLocalRequestContext(ctx context.Context) context.Context

NewLocalRequestContext returns a Context that can be used for local (in-process) requests.

func RequestDidNotStart added in v1.1.0

func RequestDidNotStart(err error) bool

RequestDidNotStart returns true if the given error from gRPC means that the request definitely could not have started on the remote server.

This method currently depends on implementation details, matching on the text of an error message that is known to only be used in this case in the version of gRPC that we use today. We will need to watch for changes here in future versions of gRPC. TODO(bdarnell): Replace this with a cleaner mechanism when/if https://github.com/grpc/grpc-go/issues/1443 is resolved.

Types

This section is empty.

Jump to

Keyboard shortcuts

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