listenermux

package
v1.3.21 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package listenermux shares a TCP listener between plaintext HTTP/1 and native gRPC. HTTP/2 connections and TLS handshakes are passed unchanged to gRPC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mux

type Mux struct {
	// contains filtered or unexported fields
}

Mux owns a listener and any connections not yet handed to a protocol server. Close leaves handed-off connections open for those servers to drain. This is connection-level routing: HTTP/2 REST and HTTPS are not supported.

func New

func New(listener net.Listener) (*Mux, error)

func (*Mux) Close

func (m *Mux) Close() error

func (*Mux) GRPCListener

func (m *Mux) GRPCListener() net.Listener

func (*Mux) HTTPListener

func (m *Mux) HTTPListener() net.Listener

func (*Mux) Serve

func (m *Mux) Serve(ctx context.Context) error

Serve must be called exactly once. It waits for classifiers on exit.

Jump to

Keyboard shortcuts

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