fakes

package
v1.77.0-pre Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package fakes contains mocks used for testing 'kubectl exec' session recording functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsciinemaResizeMsg

func AsciinemaResizeMsg(t *testing.T, width, height int) []byte

func CastLine

func CastLine(t *testing.T, p []byte, clock tstime.Clock) []byte

func New

func New(conn net.Conn, wb bytes.Buffer, rb bytes.Buffer, closed bool) net.Conn

func RandomBytes

func RandomBytes(t *testing.T) [][]byte

Types

type TestConn

type TestConn struct {
	net.Conn

	sync.RWMutex // protects the following
	// contains filtered or unexported fields
}

func (*TestConn) Close

func (tc *TestConn) Close() error

func (*TestConn) IsClosed

func (tc *TestConn) IsClosed() bool

func (*TestConn) Read

func (tc *TestConn) Read(b []byte) (int, error)

func (*TestConn) ResetReadBuf

func (tc *TestConn) ResetReadBuf()

func (*TestConn) Write

func (tc *TestConn) Write(b []byte) (int, error)

func (*TestConn) WriteBufBytes

func (tc *TestConn) WriteBufBytes() []byte

func (*TestConn) WriteReadBufBytes

func (tc *TestConn) WriteReadBufBytes(b []byte) error

type TestSessionRecorder

type TestSessionRecorder struct {
	// contains filtered or unexported fields
}

func (*TestSessionRecorder) Bytes

func (t *TestSessionRecorder) Bytes() []byte

func (*TestSessionRecorder) Close

func (t *TestSessionRecorder) Close() error

func (*TestSessionRecorder) Write

func (t *TestSessionRecorder) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL