server

package
v0.2.3-0...-bf5bd2f Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDowngradingHandler

func CreateDowngradingHandler(grpcSrv *grpc.Server, httpHandler http.Handler, opts ...Option) http.Handler

CreateDowngradingHandler takes a gRPC server and a plain HTTP handler, and returns an HTTP handler that has the capability of handling HTTP requests and gRPC requests that may require downgrading the response to gRPC-Web or gRPC-WebSocket.

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option is an object that controls the behavior of the downgrading gRPC server.

func AlwaysTryGRPCWeb

func AlwaysTryGRPCWeb(always bool) Option

func PreferGRPCWeb

func PreferGRPCWeb(prefer bool) Option

PreferGRPCWeb instructs the server to always send a downgraded gRPC-Web response if the client indicates it accepts gRPC-Web responses.

func SkipValidateMethod

func SkipValidateMethod(skip bool) Option

Jump to

Keyboard shortcuts

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