apimachinery: k8s.io/apimachinery/pkg/util/httpstream/spdy Index | Files

package spdy

import "k8s.io/apimachinery/pkg/util/httpstream/spdy"

Index

Package Files

connection.go roundtripper.go upgrade.go

Constants

const HeaderSpdy31 = "SPDY/3.1"

func NewClientConnection Uses

func NewClientConnection(conn net.Conn) (httpstream.Connection, error)

NewClientConnection creates a new SPDY client connection.

func NewResponseUpgrader Uses

func NewResponseUpgrader() httpstream.ResponseUpgrader

NewResponseUpgrader returns a new httpstream.ResponseUpgrader that is capable of upgrading HTTP responses using SPDY/3.1 via the spdystream package.

func NewServerConnection Uses

func NewServerConnection(conn net.Conn, newStreamHandler httpstream.NewStreamHandler) (httpstream.Connection, error)

NewServerConnection creates a new SPDY server connection. newStreamHandler will be invoked when the server receives a newly created stream from the client.

type SpdyRoundTripper Uses

type SpdyRoundTripper struct {

    // Dialer is the dialer used to connect.  Used if non-nil.
    Dialer *net.Dialer
    // contains filtered or unexported fields
}

SpdyRoundTripper knows how to upgrade an HTTP request to one that supports multiplexed streams. After RoundTrip() is invoked, Conn will be set and usable. SpdyRoundTripper implements the UpgradeRoundTripper interface.

func NewRoundTripper Uses

func NewRoundTripper(tlsConfig *tls.Config, followRedirects, requireSameHostRedirects bool) *SpdyRoundTripper

NewRoundTripper creates a new SpdyRoundTripper that will use the specified tlsConfig.

func NewRoundTripperWithProxy Uses

func NewRoundTripperWithProxy(tlsConfig *tls.Config, followRedirects, requireSameHostRedirects bool, proxier func(*http.Request) (*url.URL, error)) *SpdyRoundTripper

NewRoundTripperWithProxy creates a new SpdyRoundTripper that will use the specified tlsConfig and proxy func.

func (*SpdyRoundTripper) Dial Uses

func (s *SpdyRoundTripper) Dial(req *http.Request) (net.Conn, error)

Dial implements k8s.io/apimachinery/pkg/util/net.Dialer.

func (*SpdyRoundTripper) NewConnection Uses

func (s *SpdyRoundTripper) NewConnection(resp *http.Response) (httpstream.Connection, error)

NewConnection validates the upgrade response, creating and returning a new httpstream.Connection if there were no errors.

func (*SpdyRoundTripper) RoundTrip Uses

func (s *SpdyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip executes the Request and upgrades it. After a successful upgrade, clients may call SpdyRoundTripper.Connection() to retrieve the upgraded connection.

func (*SpdyRoundTripper) TLSClientConfig Uses

func (s *SpdyRoundTripper) TLSClientConfig() *tls.Config

TLSClientConfig implements pkg/util/net.TLSClientConfigHolder for proper TLS checking during proxying with a spdy roundtripper.

Package spdy imports 26 packages (graph) and is imported by 80 packages. Updated 2020-05-27. Refresh now. Tools for package owners.