serverutil

package
v0.1.1-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GrpcGatewayMux

func GrpcGatewayMux(addr string, transportCreds credentials.TransportCredentials,
	services ...RegisterServiceFromEndpoint) (*runtime.ServeMux, error)

GrpcGatewayMux registers multiple gRPC services with a gRPC ServeMux

func GrpcHandlerFunc

func GrpcHandlerFunc(grpcServer http.Handler, otherHandler http.Handler) http.Handler

GrpcHandlerFunc returns an http.Handler that delegates to grpcServer on incoming gRPC connections or otherHandler otherwise. Copied from cockroachdb.

Types

type RegisterServiceFromEndpoint

type RegisterServiceFromEndpoint func(context.Context, *runtime.ServeMux, string, []grpc.DialOption) error

RegisterServiceFromEndpoint registers services with a grpc server's ServeMux

Jump to

Keyboard shortcuts

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