server

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 19 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 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

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.

Jump to

Keyboard shortcuts

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