Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CacheTTL is timeout after which tokens become invalid. CacheTTL = 1 * time.Minute // MaxInFlight is the maximum number of in-flight requests to allow. MaxInFlight = 1000 // TokenLen is the length of the random base64 encoded token identifying the request. TokenLen = 8 )
Functions ¶
func ErrorStreamingDisabled ¶
ErrorStreamingDisabled returns error when the streaming method is disabled.
func ErrorTooManyInFlight ¶
func ErrorTooManyInFlight() error
ErrorTooManyInFlight returns error when the maximum number of in-flight requests is exceeded.
func WriteError ¶
func WriteError(err error, w http.ResponseWriter) error
WriteError translates a CRI streaming error into an appropriate HTTP response.
Types ¶
type Request ¶
type Request interface{}
Request representing an *ExecRequest, *AttachRequest, or *PortForwardRequest Type.
type RequestCache ¶
type RequestCache struct {
// contains filtered or unexported fields
}
RequestCache caches streaming (exec/attach/port-forward) requests and generates a single-use random token for their retrieval. The requestCache is used for building streaming URLs without the need to encode every request parameter in the URL.
Click to show internal directories.
Click to hide internal directories.