tgdef

package
v0.0.0-...-6c4fd92 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: NIST-PD-fallback Imports: 4 Imported by: 0

Documentation

Overview

Package tgdef contains common definitions and helpers for traffic generator.

Index

Constants

View Source
const (
	RoleConsumer = "CONSUMER"
	RoleProducer = "PRODUCER"
)

Role names.

Variables

This section is empty.

Functions

func GatherWorkers

func GatherWorkers[W ealthread.ThreadWithRole](list []W) (workers []ealthread.ThreadWithRole)

GatherWorkers helps implementing Module.Workers.

func LaunchWorkers

func LaunchWorkers[W ealthread.Thread](workers []W)

LaunchWorkers helps implementing Module.Launch.

func StopWorkers

func StopWorkers[W ealthread.Thread](workers []W) error

StopWorkers helps implementing Module.Stop.

Types

type Consumer

type Consumer interface {
	Module
	ConnectRxQueues(demuxD, demuxN *iface.InputDemux)
}

Consumer represents a consumer module.

type Module

type Module interface {
	io.Closer

	Face() iface.Face

	Workers() (list []ealthread.ThreadWithRole)
	Launch()
	Stop() error
}

Module represents a traffic generator module.

type Producer

type Producer interface {
	Module
	ConnectRxQueues(demuxI *iface.InputDemux)
}

Producer represents a producer module.

Jump to

Keyboard shortcuts

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