rpcutil

package
v0.12.4-dev Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBenignCloseErr

func IsBenignCloseErr(err error) bool

IsBenignCloseErr returns true if the error is "expected" upon shutdown of the server.

func OpenTracingClientInterceptor

func OpenTracingClientInterceptor() grpc.UnaryClientInterceptor

OpenTracingClientInterceptor provides a default gRPC client interceptor for emitting tracing to the global OpenTracing tracer.

func OpenTracingServerInterceptor

func OpenTracingServerInterceptor() grpc.UnaryServerInterceptor

OpenTracingServerInterceptor provides a default gRPC server interceptor for emitting tracing to the global OpenTracing tracer.

func Serve

func Serve(port int, cancel chan bool, registers []func(*grpc.Server) error) (int, chan error, error)

Serve creates a new gRPC server, calls out to the supplied registration functions to bind interfaces, and then listens on the supplied TCP port. If the caller wishes for the kernel to choose a free port automatically, pass 0 as the port number. The return values are: the chosen port (the same as supplied if non-0), a channel that may eventually return an error, and an error, in case something went wrong. The channel is non-nil and waits until the server is finished, in the case of a successful launch of the RPC server.

Types

This section is empty.

Directories

Path Synopsis
Package rpcerror provides helper types and functions for dealing with errors that cross gRPC boundaries.
Package rpcerror provides helper types and functions for dealing with errors that cross gRPC boundaries.

Jump to

Keyboard shortcuts

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