integrationlib

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 19 Imported by: 2 modules, 1 package

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

View Source
const (
	ModeServer       = "server"
	ModeClient       = "client"
	DefaultIOTimeout = 1 * time.Second
)

Variables

View Source
var (
	Local    snet.UDPAddr
	Mode     string
	Progress string

	Attempts int
)

Functions

func AttemptRepeatedly

func AttemptRepeatedly(name string, attempt AttemptFunc) int

AttemptRepeatedly runs attempt until it returns true (succeeded => stop) or more than Attempts were executed. Between two attempts at least RetryTimeout time has to pass. Returns 0 on success, 1 on failure.

func Done

func Done(src, dst addr.IA)

Done informs the integration test that a test binary has finished.

func InitTracer

func InitTracer(name string) (func(), error)

InitTracer initializes the global tracer and returns a closer function.

func LogFatal

func LogFatal(msg string, a ...any)

LogFatal logs a critical error and exits with 1

func RepeatUntilFail added in v0.10.0

func RepeatUntilFail(name string, doit AttemptFunc) int

RepeatUntilFail runs doit() until it returns true (failed -> stop) or more than Attempts were executed. There is no delay nor logging between attempts. Returns 0 if all Attempts succeeded, 1 on failure. This is very similar to AttemptRepeatedly, but difference in failure/success behaviour justify a different function: parameter-based tweaks would be easily confusing.

func SDConn

func SDConn() daemon.Connector

SDConn returns a daemon connector. If -sciond is specified, it connects to a remote daemon. Otherwise (default), it creates a standalone daemon connector using the topology file from -topoDir.

func Setup

func Setup() error

Types

type AttemptFunc

type AttemptFunc func(n int) bool

AttemptFunc attempts a request repeatedly, receives the attempt number

Jump to

Keyboard shortcuts

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