mux

package
v0.0.0-...-e01fbee Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCookieValue

func GetCookieValue(headerValues []string, key string) (string, error)

GetCookieValue is the easiest way to parse a cookie string in a non-HTTP request context.

func InsecureHandler

func InsecureHandler(handler http.Handler) http.Handler

"h2c" is the unencrypted form of HTTP/2.

Types

type Mux

type Mux struct {
	// Create empty handlers for gRPC and grpc-gateway (JSON) traffic.
	JSONGateway *runtime.ServeMux
	HTTPMux     http.Handler
	GRPCServer  *grpc.Server
}

Mux allows sharing one port between gRPC and the corresponding JSON gateway via header-based multiplexing.

func New

func New(unaryInterceptors []grpc.UnaryServerInterceptor, assets http.FileSystem, metricsHandler http.Handler, gatewayCfg *gatewayv1.GatewayOptions) (*Mux, error)

func (*Mux) EnableGRPCReflection

func (m *Mux) EnableGRPCReflection()

Jump to

Keyboard shortcuts

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