package spdy
import "k8s.io/apimachinery/pkg/util/httpstream/spdy"
Package spdy contains compatibility wrappers for the SPDY transport stack.
Deprecated: use k8s.io/streaming/pkg/httpstream/spdy directly.
Index ¶
- Constants
- func NewClientConnection(conn net.Conn) (apihttpstream.Connection, error)
- func NewClientConnectionWithPings(conn net.Conn, pingPeriod time.Duration) (apihttpstream.Connection, error)
- func NewResponseUpgrader() apihttpstream.ResponseUpgrader
- func NewResponseUpgraderWithPings(pingPeriod time.Duration) apihttpstream.ResponseUpgrader
- func NewServerConnection(conn net.Conn, newStreamHandler apihttpstream.NewStreamHandler) (apihttpstream.Connection, error)
- func NewServerConnectionWithPings(conn net.Conn, newStreamHandler apihttpstream.NewStreamHandler, pingPeriod time.Duration) (apihttpstream.Connection, error)
- type RoundTripperConfig
- type SpdyRoundTripper
- func NewRoundTripper(tlsConfig *tls.Config) (*SpdyRoundTripper, error)
- func NewRoundTripperWithConfig(cfg RoundTripperConfig) (*SpdyRoundTripper, error)
- func NewRoundTripperWithProxy(tlsConfig *tls.Config, proxier func(*http.Request) (*url.URL, error)) (*SpdyRoundTripper, error)
- func (s *SpdyRoundTripper) Dial(req *http.Request) (net.Conn, error)
- func (s *SpdyRoundTripper) NewConnection(resp *http.Response) (apihttpstream.Connection, error)
- func (s *SpdyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)
- func (s *SpdyRoundTripper) TLSClientConfig() *tls.Config
Constants ¶
const HeaderSpdy31 = streamspdy.HeaderSpdy31
Functions ¶
func NewClientConnection ¶
func NewClientConnection(conn net.Conn) (apihttpstream.Connection, error)
func NewClientConnectionWithPings ¶
func NewClientConnectionWithPings(conn net.Conn, pingPeriod time.Duration) (apihttpstream.Connection, error)
func NewResponseUpgrader ¶
func NewResponseUpgrader() apihttpstream.ResponseUpgrader
func NewResponseUpgraderWithPings ¶
func NewResponseUpgraderWithPings(pingPeriod time.Duration) apihttpstream.ResponseUpgrader
func NewServerConnection ¶
func NewServerConnection(conn net.Conn, newStreamHandler apihttpstream.NewStreamHandler) (apihttpstream.Connection, error)
func NewServerConnectionWithPings ¶
func NewServerConnectionWithPings(conn net.Conn, newStreamHandler apihttpstream.NewStreamHandler, pingPeriod time.Duration) (apihttpstream.Connection, error)
Types ¶
type RoundTripperConfig ¶
type RoundTripperConfig struct {
// TLS configuration used by the round tripper if UpgradeTransport not present.
TLS *tls.Config
// Proxier is a proxy function invoked on each request. Optional.
Proxier func(*http.Request) (*url.URL, error)
// PingPeriod is a period for sending SPDY Pings on the connection.
// Optional.
PingPeriod time.Duration
// UpgradeTransport is a subtitute transport used for dialing. If set,
// this field will be used instead of "TLS" and "Proxier" for connection creation.
// Optional.
UpgradeTransport http.RoundTripper
}
RoundTripperConfig is a set of options for an SpdyRoundTripper.
type SpdyRoundTripper ¶
type SpdyRoundTripper struct {
// contains filtered or unexported fields
}
SpdyRoundTripper is a compatibility wrapper around the streaming module's SPDY round tripper.
func NewRoundTripper ¶
func NewRoundTripper(tlsConfig *tls.Config) (*SpdyRoundTripper, error)
func NewRoundTripperWithConfig ¶
func NewRoundTripperWithConfig(cfg RoundTripperConfig) (*SpdyRoundTripper, error)
func NewRoundTripperWithProxy ¶
func NewRoundTripperWithProxy(tlsConfig *tls.Config, proxier func(*http.Request) (*url.URL, error)) (*SpdyRoundTripper, error)
func (*SpdyRoundTripper) Dial ¶
Dial opens a network connection for an upgrade request.
func (*SpdyRoundTripper) NewConnection ¶
func (s *SpdyRoundTripper) NewConnection(resp *http.Response) (apihttpstream.Connection, error)
NewConnection validates a server upgrade response and prepares the transport.
func (*SpdyRoundTripper) RoundTrip ¶
RoundTrip executes a request and upgrades the connection.
func (*SpdyRoundTripper) TLSClientConfig ¶
func (s *SpdyRoundTripper) TLSClientConfig() *tls.Config
TLSClientConfig implements pkg/util/net.TLSClientConfigHolder for proper TLS checking during proxying with a spdy roundtripper.
Source Files ¶
doc.go spdy.go
- Version
- v0.36.0 (latest)
- Published
- Apr 22, 2026
- Platform
- js/wasm
- Imports
- 8 packages
- Last checked
- 1 minute ago –
Tools for package owners.