util

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertClosed

func AssertClosed(t testing.TB, closed <-chan struct{}, name string)

func AssertMessage

func AssertMessage(t testing.TB, messages <-chan []byte, expected string)

func AssertNoAsyncError

func AssertNoAsyncError(t testing.TB, asyncErrors <-chan error)

func CloseClient

func CloseClient(t testing.TB, client *arctic.Client)

func CloseClients

func CloseClients(t testing.TB, clients []*arctic.Client)

func CloseGobServer

func CloseGobServer[MessageType any](
	t testing.TB,
	server *arctic.GobServer[MessageType],
	listenDone <-chan error,
)

func CloseServer

func CloseServer(t testing.TB, server *arctic.Server, listenDone <-chan error)

func IsExpectedAsyncCloseError

func IsExpectedAsyncCloseError(err error) (expected bool)

func NewUDPClient

func NewUDPClient(
	t testing.TB,
	address string,
	asyncErrors chan<- error,
) (client *arctic.Client, messages chan []byte)

func StartGobServer

func StartGobServer[MessageType any](
	t testing.TB,
	server *arctic.GobServer[MessageType],
) (listenDone chan error)

func StartServer

func StartServer(t testing.TB, server *arctic.Server) (listenDone chan error)

func WaitBenchmarkResponse

func WaitBenchmarkResponse(t testing.TB, responses <-chan []byte)

func WaitForAddress

func WaitForAddress(t testing.TB, provider AddressProvider) (address string)

func WaitForListenExit

func WaitForListenExit(t testing.TB, listenDone <-chan error)

Types

type AddressProvider

type AddressProvider interface {
	Addr() net.Addr
}

type GobMessage

type GobMessage struct {
	Text  string
	Count int
}

Jump to

Keyboard shortcuts

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