github.com/spotmaxtech/k8s-apimachinery-v0260@v0.0.1/pkg/util/remotecommand/constants.go (about) 1 /* 2 Copyright 2016 The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package remotecommand 18 19 import ( 20 "time" 21 22 metav1 "github.com/spotmaxtech/k8s-apimachinery-v0260/pkg/apis/meta/v1" 23 ) 24 25 const ( 26 DefaultStreamCreationTimeout = 30 * time.Second 27 28 // The SPDY subprotocol "channel.k8s.io" is used for remote command 29 // attachment/execution. This represents the initial unversioned subprotocol, 30 // which has the known bugs https://issues.k8s.io/13394 and 31 // https://issues.k8s.io/13395. 32 StreamProtocolV1Name = "channel.k8s.io" 33 34 // The SPDY subprotocol "v2.channel.k8s.io" is used for remote command 35 // attachment/execution. It is the second version of the subprotocol and 36 // resolves the issues present in the first version. 37 StreamProtocolV2Name = "v2.channel.k8s.io" 38 39 // The SPDY subprotocol "v3.channel.k8s.io" is used for remote command 40 // attachment/execution. It is the third version of the subprotocol and 41 // adds support for resizing container terminals. 42 StreamProtocolV3Name = "v3.channel.k8s.io" 43 44 // The SPDY subprotocol "v4.channel.k8s.io" is used for remote command 45 // attachment/execution. It is the 4th version of the subprotocol and 46 // adds support for exit codes. 47 StreamProtocolV4Name = "v4.channel.k8s.io" 48 49 NonZeroExitCodeReason = metav1.StatusReason("NonZeroExitCode") 50 ExitCodeCauseType = metav1.CauseType("ExitCode") 51 ) 52 53 var SupportedStreamingProtocols = []string{StreamProtocolV4Name, StreamProtocolV3Name, StreamProtocolV2Name, StreamProtocolV1Name}