constants.go 1.7 KB

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