connect

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdaptClientTLS

func AdaptClientTLS(cfg *tls.Config) *tls.Config

AdaptClientTLS adapts the TLS config for use with a client, specifically setting the NextProtos to "h3" to require HTTP/3 support.

func AdaptTLS

func AdaptTLS(cfg *tls.Config) *tls.Config

AdaptTLS adapts the TLS config to indicate HTTP/3 and connectgrpc support.

func AttachPeer

func AttachPeer(next http.Handler) http.Handler

AttachPeer creates a middleware that attaches the remote address to the context with the grpc-go peer mechanism.

func BaseUrl

func BaseUrl(server net.Addr) string

Types

type ConnectionDispatcher

type ConnectionDispatcher struct {
	Listener *quic.Listener
	Connect  QUICConnServer
	Grpc     QUICConnServer
	Error    func(error)
}

func (ConnectionDispatcher) Run

Run accepts connections and dispatches them to the appropriate server handler.

type Dialer

type Dialer = func(net.Addr, ...squic.EarlyDialerOption) squic.EarlyDialer

type HTTPClient

type HTTPClient struct {
	RoundTripper *http3.Transport
}

func (HTTPClient) Do

func (c HTTPClient) Do(req *http.Request) (*http.Response, error)

type QUICConnServer

type QUICConnServer interface {
	ServeQUICConn(conn *quic.Conn) error
}

type QUICConnServerFunc

type QUICConnServerFunc func(conn *quic.Conn) error

func (QUICConnServerFunc) ServeQUICConn

func (f QUICConnServerFunc) ServeQUICConn(conn *quic.Conn) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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