From d21662ddfcd3cc1887127276ee916286adaa4dfa Mon Sep 17 00:00:00 2001 From: Mikhail Mazurskiy Date: Sun, 3 Aug 2025 20:35:40 +1000 Subject: [PATCH] Decouple term and remotecommand packages This allows consumers of term to not pull in dependencies on github.com/gorilla/websocket and github.com/moby/spdystream. Kubernetes-commit: 640dabd58b04b72f646ed85947cb8b407b36dc08 --- tools/remotecommand/resize.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/remotecommand/resize.go b/tools/remotecommand/resize.go index c838f21b..2815112a 100644 --- a/tools/remotecommand/resize.go +++ b/tools/remotecommand/resize.go @@ -16,16 +16,17 @@ limitations under the License. package remotecommand -// TerminalSize and TerminalSizeQueue was a part of k8s.io/kubernetes/pkg/util/term -// and were moved in order to decouple client from other term dependencies - // TerminalSize represents the width and height of a terminal. +// It is the same as staging/src/k8s.io/kubectl/pkg/util/term.TerminalSize. +// Copied to decouple the packages. Terminal-related package should not depend on API client and vice versa. type TerminalSize struct { Width uint16 Height uint16 } // TerminalSizeQueue is capable of returning terminal resize events as they occur. +// It is the same as staging/src/k8s.io/kubectl/pkg/util/term.TerminalSizeQueue. +// Copied to decouple the packages. Terminal-related package should not depend on API client and vice versa. type TerminalSizeQueue interface { // Next returns the new terminal size after the terminal has been resized. It returns nil when // monitoring has been stopped.