Documentation
¶
Index ¶
- type Node
- type NodePair
- type NodeRegistry
- type ProcessCapacity
- type ProfileRegistry
- type Protocol
- type TestAssignment
- type TestMatrix
- func (m *TestMatrix) CountTests() int
- func (m *TestMatrix) GenerateFullMesh() []*TestAssignment
- func (m *TestMatrix) GetPairProfile(source, destination *Node) *TestProfile
- func (m *TestMatrix) GroupAssignmentsByDestination() map[string][]*TestAssignment
- func (m *TestMatrix) GroupAssignmentsBySource() map[string][]*TestAssignment
- func (m *TestMatrix) SetPairProfile(source, destination *Node, profile *TestProfile)
- type TestProfile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
ID string
Hostname string
IP string
Port int
Capacity ProcessCapacity
Tags []string
}
Node represents a node in the cluster
type NodePair ¶
NodePair represents a source-destination pair
type NodeRegistry ¶
type NodeRegistry struct {
// contains filtered or unexported fields
}
NodeRegistry manages a collection of nodes
func NewNodeRegistry ¶
func NewNodeRegistry() *NodeRegistry
NewNodeRegistry creates a new node registry
func (*NodeRegistry) AddNode ¶
func (r *NodeRegistry) AddNode(node *Node) error
AddNode adds a node to the registry
func (*NodeRegistry) Count ¶
func (r *NodeRegistry) Count() int
Count returns the number of registered nodes
func (*NodeRegistry) GetAllNodes ¶
func (r *NodeRegistry) GetAllNodes() []*Node
GetAllNodes returns all registered nodes
func (*NodeRegistry) GetNode ¶
func (r *NodeRegistry) GetNode(id string) (*Node, error)
GetNode retrieves a node by ID
func (*NodeRegistry) GetNodesByTag ¶
func (r *NodeRegistry) GetNodesByTag(tag string) []*Node
GetNodesByTag returns all nodes with a specific tag
type ProcessCapacity ¶
type ProcessCapacity struct {
MaxProcesses int
AvailableProcesses int
CPUCores int
AvailableMemory int64
NetworkInterfaces []string
}
ProcessCapacity represents a node's ability to run processes
type ProfileRegistry ¶
type ProfileRegistry struct {
// contains filtered or unexported fields
}
ProfileRegistry manages test profiles
func NewProfileRegistry ¶
func NewProfileRegistry() *ProfileRegistry
NewProfileRegistry creates a new profile registry
func (*ProfileRegistry) AddProfile ¶
func (r *ProfileRegistry) AddProfile(profile *TestProfile) error
AddProfile adds a profile to the registry
func (*ProfileRegistry) GetAllProfiles ¶
func (r *ProfileRegistry) GetAllProfiles() map[string]*TestProfile
GetAllProfiles returns all registered profiles
func (*ProfileRegistry) GetProfile ¶
func (r *ProfileRegistry) GetProfile(name string) (*TestProfile, error)
GetProfile retrieves a profile by name
type Protocol ¶ added in v0.1.5
type Protocol string
Protocol represents the transport protocol for iperf3 tests
type TestAssignment ¶
type TestAssignment struct {
ID string
Source *Node
Destination *Node
Profile *TestProfile
}
TestAssignment represents a test to be executed
func (*TestAssignment) String ¶
func (a *TestAssignment) String() string
String returns a string representation of the test assignment
type TestMatrix ¶
type TestMatrix struct {
DefaultProfile *TestProfile
NodePairs map[NodePair]*TestProfile
Nodes *NodeRegistry
}
TestMatrix contains the full test topology and profile assignments
func NewTestMatrix ¶
func NewTestMatrix(defaultProfile *TestProfile, nodes *NodeRegistry) *TestMatrix
NewTestMatrix creates a new test matrix
func (*TestMatrix) CountTests ¶
func (m *TestMatrix) CountTests() int
CountTests returns the total number of tests in the matrix
func (*TestMatrix) GenerateFullMesh ¶
func (m *TestMatrix) GenerateFullMesh() []*TestAssignment
GenerateFullMesh creates test assignments for a full mesh topology
func (*TestMatrix) GetPairProfile ¶
func (m *TestMatrix) GetPairProfile(source, destination *Node) *TestProfile
GetPairProfile gets the profile for a node pair, returns default if not set
func (*TestMatrix) GroupAssignmentsByDestination ¶
func (m *TestMatrix) GroupAssignmentsByDestination() map[string][]*TestAssignment
GroupAssignmentsByDestination groups test assignments by destination node
func (*TestMatrix) GroupAssignmentsBySource ¶
func (m *TestMatrix) GroupAssignmentsBySource() map[string][]*TestAssignment
GroupAssignmentsBySource groups test assignments by source node
func (*TestMatrix) SetPairProfile ¶
func (m *TestMatrix) SetPairProfile(source, destination *Node, profile *TestProfile)
SetPairProfile sets a specific profile for a node pair
type TestProfile ¶
type TestProfile struct {
Name string
Duration int
Protocol Protocol // TCP or UDP (default: TCP)
Bandwidth string
WindowSize string
Parallel int
Bidirectional bool
Reverse bool
BufferLength int
CongestionControl string // TCP only
MSS int // TCP only
NoDelay bool // TCP only
TOS int
ZeroCopy bool
OmitSeconds int
ExtraFlags map[string]string
}
TestProfile contains all iperf3 parameters for a test
func (*TestProfile) Clone ¶
func (p *TestProfile) Clone() *TestProfile
Clone creates a deep copy of the test profile
func (*TestProfile) String ¶
func (p *TestProfile) String() string
String returns a string representation of the profile
func (*TestProfile) ToCommandArgs ¶
func (p *TestProfile) ToCommandArgs() []string
ToCommandArgs converts the profile to iperf3 command line arguments
func (*TestProfile) Validate ¶
func (p *TestProfile) Validate() error
Validate checks if the profile is valid