helpers

package
v0.0.0-...-63ce7f8 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package helpers provides utility functions for gRPC servers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMuxedGRPCServer

func NewMuxedGRPCServer(addr string, tlsConfig *tls.Config, grpcServer http.Handler, httpHandler http.Handler, timeout time.Duration) *http.Server

NewMuxedGRPCServer returns an http.Server that multiplexes connections between a gRPC server and an HTTP handler.

func TimeoutHandlerFunc

func TimeoutHandlerFunc(httpHandler http.Handler, timeout time.Duration) http.Handler

TimeoutHandlerFunc returns an HTTP handler that times out after a duration. This is useful for muxed gRPC servers where http.Server cannot have a timeout when handling streaming, long running connections.

Types

This section is empty.

Jump to

Keyboard shortcuts

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