MCPcopy Index your code
hub / github.com/cloudnative-pg/cloudnative-pg / shouldFallbackToSPDY

Function shouldFallbackToSPDY

pkg/utils/exec.go:183–185  ·  view source on GitHub ↗

shouldFallbackToSPDY reports whether a failed WebSocket streaming attempt should be retried over SPDY. This mirrors kubectl's own fallback predicate: a WebSocket upgrade failure (e.g. an API server or container runtime that does not support the V5 WebSocket subprotocol, as on some OpenShift versions

(err error)

Source from the content-addressed store, hash-verified

181// proxy dial failure is detected separately. Both indicate the connection was
182// never established over WebSocket and is safe to retry over SPDY.
183func shouldFallbackToSPDY(err error) bool {
184 return httpstream.IsUpgradeFailure(err) || httpstream.IsHTTPSProxyError(err)
185}
186
187// execCommandOnce performs a single kubectl exec operation without retries
188func execCommandOnce(

Callers 1

exec_test.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected