update message examples
This commit is contained in:
parent
1f9a95897e
commit
9d95c05457
222
message_examples.json
Normal file
222
message_examples.json
Normal file
@ -0,0 +1,222 @@
|
||||
Messages from Agent
|
||||
- TO MAIN QUEUE:
|
||||
AGENT_HELLO:
|
||||
{
|
||||
"message": AGENT_HELLO (0),
|
||||
"data": {
|
||||
"hostname": "<agent_hostname>",
|
||||
"version": "<agent_version>",
|
||||
"interfaces": ["ens0p0","ens0p1"]
|
||||
}
|
||||
}
|
||||
|
||||
AGENT_ERROR: // for errors that are not related to tasks
|
||||
{
|
||||
"message": AGENT_ERROR (1),
|
||||
"data": {
|
||||
"error": "<error>"
|
||||
}
|
||||
}
|
||||
|
||||
- TO SEPARATED QUEUE:
|
||||
AGENT_STATUS:
|
||||
{
|
||||
"message": AGENT_STATUS (2),
|
||||
"data": {
|
||||
"status": TASK_STATUS_<STATUS>, // PREPARING (0), RUNNING (1), STOPPED (2), FINISHED (3), ERROR (4)
|
||||
"taskId": <task_id>,
|
||||
"progress": "Optional 0-100 for TASK_STATUS_RUNNIG",
|
||||
"error": "Optional for TASK_STATUS_ERROR"
|
||||
}
|
||||
}
|
||||
|
||||
AGENT_PING:
|
||||
{
|
||||
"message": AGENT_PING (3),
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Messages from Controller
|
||||
- TO SEPARATED QUEUE:
|
||||
CONTROLLER_PONG:
|
||||
{
|
||||
"message": CONTROLLER_PONG (3),
|
||||
}
|
||||
|
||||
CONTROLLER_TASK_PAUSE:
|
||||
{
|
||||
"message": CONTROLLER_TASK_PAUSE (1),
|
||||
"data": {
|
||||
"taskId": <task_id>
|
||||
}
|
||||
}
|
||||
|
||||
CONTROLLER_TASK_STOP:
|
||||
{
|
||||
"message": CONTROLLER_TASK_STOP (2),
|
||||
"data": {
|
||||
"taskId": <task_id>
|
||||
}
|
||||
}
|
||||
|
||||
CONTROLLER_TASK_START:
|
||||
{
|
||||
"message": CONTROLLER_TASK_START (0),
|
||||
"data": {
|
||||
"taskId": <task_id>,
|
||||
"data": {
|
||||
"type": TYPE_VFIO (0), // TYPE_POSIX (1)
|
||||
"mode": MODE_THROUGHPUT_BPS (0), // MODE_THROUGHPUT_PPS (1), MODE_TCP_CONNECTIONS (2), MODE_USERS (3),
|
||||
"time": <duration_in_seconds>,
|
||||
"sourceClient": [
|
||||
"enp0s0": [
|
||||
{
|
||||
"IPs": ["127.0.0.0/24", "120.0.1.1/32"], // SRC-IPs mask cannot be duplicated into two or more entities within 1 network interface
|
||||
"MACs": {
|
||||
"mode": IP_HASH (1),
|
||||
"addresses": [
|
||||
{
|
||||
"address": "00-B0-D0-63-C2-26",
|
||||
},
|
||||
{
|
||||
"address": "01-B0-D0-63-C2-26",
|
||||
}
|
||||
],
|
||||
},
|
||||
"nextHops": {
|
||||
"mode": ROUND_ROBIN (0),
|
||||
"addresses": [
|
||||
{
|
||||
"address": "00-B0-D0-63-C2-26",
|
||||
"weight": 47,
|
||||
},
|
||||
{
|
||||
"address": "01-B0-D0-63-C2-26",
|
||||
"weight": 53,
|
||||
}
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
"enp0s1": [
|
||||
{
|
||||
"IPs": ["121.0.1.1/32"],
|
||||
"MACs": {
|
||||
"mode": IP_HASH (1),
|
||||
"addresses": [
|
||||
{
|
||||
"address": "00-B0-D0-63-C2-26",
|
||||
},
|
||||
{
|
||||
"address": "01-B0-D0-63-C2-26",
|
||||
}
|
||||
],
|
||||
}, // every packet receives round-robin balancing mac
|
||||
"nextHops": {
|
||||
"mode": ROUND_ROBIN (0),
|
||||
"addresses": [
|
||||
{
|
||||
"address": "00-B0-D0-63-C2-26",
|
||||
"weight": 47,
|
||||
},
|
||||
{
|
||||
"address": "01-B0-D0-63-C2-26",
|
||||
"weight": 53,
|
||||
}
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
"IPs": ["124.0.1.0/24", "127.0.1.0/16"],
|
||||
"MACs": {
|
||||
"mode": IP_HASH (1),
|
||||
"addresses": [
|
||||
{
|
||||
"address": "00-B0-D0-63-C2-26",
|
||||
},
|
||||
{
|
||||
"address": "01-B0-D0-63-C2-26",
|
||||
}
|
||||
],
|
||||
}, // IPs hash, divide and bind to every IPv4/IPv6. MAC-адресов не может быть больше IPs-адресов
|
||||
"nextHops": {
|
||||
"mode": ROUND_ROBIN (0),
|
||||
"addresses": [
|
||||
{
|
||||
"address": "00-B0-D0-63-C2-26",
|
||||
"weight": 47,
|
||||
},
|
||||
{
|
||||
"address": "01-B0-D0-63-C2-26",
|
||||
"weight": 53,
|
||||
}
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
"IPs": ["129.0.1.1/32"],
|
||||
"MACs": {
|
||||
"mode": RANDOM (2), // random MAC every packet
|
||||
},
|
||||
"nextHops": {
|
||||
"mode": ROUND_ROBIN (0),
|
||||
"addresses": [
|
||||
{
|
||||
"address": "00-B0-D0-63-C2-26",
|
||||
"weight": 47,
|
||||
},
|
||||
{
|
||||
"address": "01-B0-D0-63-C2-26",
|
||||
"weight": 53,
|
||||
}
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
"IPs": ["128.0.1.0/24"],
|
||||
"MACs": {
|
||||
"mode": GENERATE (3), // generate mac for every IPv4/IPv6 and bind it
|
||||
},
|
||||
"nextHops": {
|
||||
"mode": ROUND_ROBIN (0),
|
||||
"addresses": [
|
||||
{
|
||||
"address": "00-B0-D0-63-C2-26",
|
||||
"weight": 47,
|
||||
},
|
||||
{
|
||||
"address": "01-B0-D0-63-C2-26",
|
||||
"weight": 53,
|
||||
}
|
||||
],
|
||||
},
|
||||
}
|
||||
],
|
||||
],
|
||||
"sourceReceiver": [
|
||||
<same_as_source_client>
|
||||
],
|
||||
"plugins": [
|
||||
{
|
||||
"plugin": <plugin_id_from_dictionary>,
|
||||
"weight": <0-100 value>
|
||||
},
|
||||
{
|
||||
"plugin": <plugin_id_from_dictionary>,
|
||||
"weight": <0-100 value>
|
||||
}
|
||||
],
|
||||
"performance": {
|
||||
"maxBps": <optional uint64 depends on selected mode>,
|
||||
"maxPps": <optional uint32 depends on selected mode>,
|
||||
"maxTcpConnections": <optional uint32 depends on selected mode>, // max bps or max pps limit required with max tcp connections
|
||||
"maxUsers": <optional uint32 depends on selected mode>
|
||||
},
|
||||
"tweaks": [[0, 10], [10, 60], [20, 60], [30, 120], ...]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user