kubernetes/staging/src/k8s.io/client-go/tools/remotecommand/spdy_test.go

type AttachFunc

type streamContext

type streamAndReply

type fakeEmptyDataPty

func (s *fakeEmptyDataPty) Read(p []byte) (int, error) {}

func (s *fakeEmptyDataPty) Write(p []byte) (int, error) {}

type fakeMassiveDataPty

func (s *fakeMassiveDataPty) Read(p []byte) (int, error) {}

func (s *fakeMassiveDataPty) Write(p []byte) (int, error) {}

func fakeMassiveDataAttacher(stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan TerminalSize) error {}

func writeMassiveData(stdStream io.Writer) struct{}

func TestSPDYExecutorStream(t *testing.T) {}

func newTestHTTPServer(f AttachFunc, options *StreamOptions) *httptest.Server {}

func attach2Server(ctx context.Context, rawURL string, options StreamOptions) error {}

// simplify createHttpStreams , only support StreamProtocolV4Name
func createHTTPStreams(w http.ResponseWriter, req *http.Request, opts *StreamOptions) (*streamContext, error) {}

func v4WriteStatusFunc(stream io.Writer) func(status *apierrors.StatusError) error {}

type writeDetector

func newWriterDetector(w io.Writer) *writeDetector {}

func (w *writeDetector) BlockUntilWritten() {}

func (w *writeDetector) Write(p []byte) (n int, err error) {}

// `Executor.StreamWithContext` starts a goroutine in the background to do the streaming
// and expects the deferred close of the connection leads to the exit of the goroutine on cancellation.
// This test verifies that works.
func TestStreamExitsAfterConnectionIsClosed(t *testing.T) {}

func TestStreamRandomData(t *testing.T) {}