grpcutil

package
v0.0.0-...-6c88f67 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GRPCHandlerFunc

func GRPCHandlerFunc(grpcServer *grpc.Server, otherHandler http.Handler) http.Handler

GRPCHandlerFunc returns an http.Handler that delegates to grpcServer on incoming gRPC connections or otherHandler otherwise.

func IsClosedConnection

func IsClosedConnection(err error) bool

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

func ListenAndServeGRPC

func ListenAndServeGRPC(stopper *stop.Stopper, server *grpc.Server, addr net.Addr, config *tls.Config) (net.Listener, error)

ListenAndServeGRPC creates a listener and serves server on it, closing the listener when signalled by the stopper.

func NewContextWithStopper

func NewContextWithStopper(base context.Context, stopper *stop.Stopper) context.Context

NewContextWithStopper returns a context whose Done() channel is closed when base's Done() channel is closed or when stopper's ShouldStop() channel is closed, whichever is first.

Types

This section is empty.

Jump to

Keyboard shortcuts

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