testutils

package
v0.0.0-...-b8194ae Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnPipe

func ConnPipe(t testing.TB) (net.Conn, net.Conn)

func GetLocalRole

func GetLocalRole(ctx context.Context, sts *sts.Client) (arn.ARN, error)

func HasAWSCredentials

func HasAWSCredentials(ctx context.Context) bool

func ListenerDialer

func ListenerDialer(t testing.TB) (net.Listener, func(context.Context, string, string) (net.Conn, error))

Types

type Conn

type Conn struct {
	Name string
	TB   testing.TB
	net.Conn
	// contains filtered or unexported fields
}

func (*Conn) Read

func (c *Conn) Read(b []byte) (n int, err error)

func (*Conn) Write

func (c *Conn) Write(b []byte) (n int, err error)

type Listener

type Listener struct {
	TB testing.TB
	net.Listener
}

func (Listener) Accept

func (l Listener) Accept() (net.Conn, error)

type RecordingConn

type RecordingConn struct {
	net.Conn

	DataSent []byte
	DataRecv []byte
}

func (*RecordingConn) Read

func (c *RecordingConn) Read(b []byte) (n int, err error)

func (*RecordingConn) Write

func (c *RecordingConn) Write(b []byte) (n int, err error)

Jump to

Keyboard shortcuts

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