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)
Click to show internal directories.
Click to hide internal directories.