goh2

package
v0.0.0-...-8ac4b46 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotFound = errors.New("not found")

Functions

This section is empty.

Types

type H2Transport

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

It also implements http.Handler, and can be registered with a HTTP/2 or HTTP/1 server. For HTTP/1 it will use websocket, with standard TLS and SPDY for crypto or mux. For HTTP/2 it will the normal connection if mTLS was negotiated. Otherwise will do a TLS+SPDY handshake for the POST method.

func NewH2Transport

func NewH2Transport(ug *ugate.UGate) (*H2Transport, error)

func (*H2Transport) DialContext

func (t *H2Transport) DialContext(ctx context.Context, addr string, s io.Reader,
	rt http.RoundTripper) (nio.Stream, error)

DialContext creates on TCP-over-H2 connection. rt is expected to be a H2 round tripper.

If s is specified, it will be used as input.

func (*H2Transport) GetClientConn

func (t *H2Transport) GetClientConn(ctx context.Context, prot string, addr string) (*http2.ClientConn, error)

GetClientConn returns H2 multiplexed client connection for connecting to a mesh host.

Part of x.net.http2.ClientConnPool interface. addr is a host:port, based on the URL host. The result implements RoundTrip interface.

func (*H2Transport) MarkDead

func (t *H2Transport) MarkDead(h2c *http2.ClientConn)

Jump to

Keyboard shortcuts

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