Documentation
¶
Index ¶
Constants ¶
const ( NonSessionBackoffInitialInterval = 500 * time.Millisecond NonSessionBackoffMultiplier = 1.2 NonSessionBackoffRandomizationFactor = 0.05 NonSessionBackoffMaxInterval = 10 * time.Second NonSessionBackoffMaxElapsedTime = 0 )
Variables ¶
This section is empty.
Functions ¶
func Base64EncodeStr ¶
Types ¶
type KubernetesClientManager ¶
KubernetesClientManager manages http clients with connection to kubernetes api server.
func (*KubernetesClientManager) Do ¶
func (kcm *KubernetesClientManager) Do(sessionID uint16, r *http.Request) (net.Conn, *http.Response, error)
Do function will automatically create new http client and do http request. The connection is hijacked and hold when response is successfully returned. If any error exists, no connection or response returned. The close of hijacked connection should be processed by function return value receiver.
type StubConnector ¶
StubConnector construct new connection to stub server
func NewStubConnector ¶
func (*StubConnector) Connect ¶
isSession = 0 means this is the connection of request channel (first registration channel) isSession = 1 means this is a new connection for some http request sessionID should be 0 is isSession = 0, otherwise it represents the current session id received from request channel
type TLSRoundTripper ¶
TLSRoundTripper is a roundtripper used for http client connection hijack Usually, http client will automatically close connection after handling response but SPDY needs to hold that connection and expose it to outer scope for later use. This roundtripper is designed to do it.
func NewTLSRoundTripper ¶
func NewTLSRoundTripper(config *tls.Config, address string) (*TLSRoundTripper, error)