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 ¶ added in v0.2.1
type Option interface {
// contains filtered or unexported methods
}
Option is an object that controls the behavior of the downgrading gRPC server.
func PreferGRPCWeb ¶ added in v0.2.1
PreferGRPCWeb instructs the server to always send a downgraded gRPC-Web response if the client indicates it accepts gRPC-Web responses.
Click to show internal directories.
Click to hide internal directories.