util

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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