testutil

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PipeConn

func PipeConn() (io.ReadWriteCloser, net.Conn)

func RunProcess added in v0.0.5

func RunProcess(tb testing.TB, cmd string, args []string)

func TCPListener

func TCPListener(tb testing.TB) net.Listener

func TCPPort

func TCPPort(tb testing.TB) int

func TempFile

func TempFile(tb testing.TB, name, content string) string

TempFile creates a temporary file that just needs to be deleted with os.Remove(f)

func WithNAllocations

func WithNAllocations(tb testing.TB, n uint64, fn func())

func WithoutAllocations

func WithoutAllocations(tb testing.TB, fn func())

Types

type HAProxyConfig

type HAProxyConfig struct {
	EngineAddr           string
	PeerAddr             string
	EngineConfig         string
	FrontendPort         string
	CustomFrontendConfig string
	BackendConfig        string
	CustomBackendConfig  string
	CustomConfig         string
}

func (HAProxyConfig) Run added in v0.0.5

func (cfg HAProxyConfig) Run(tb testing.TB) string

type RepeatReader

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

func NewRepeatReader

func NewRepeatReader(data []byte) *RepeatReader

func (*RepeatReader) Read

func (r *RepeatReader) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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