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 ¶
LaunchWorkers helps implementing Module.Launch.
func StopWorkers ¶
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.
Click to show internal directories.
Click to hide internal directories.