.. | ||
README.md |
Behaviours
Behaviours are customizable event handlers for Relay. You can specify a behaviour to different events using different handlers:
{
"behaviours": {
"[event]": {
"name": "[behaviour-name]",
"params": {
[behaviour-params]
}
}
},
}
Supported Events:
EVENT | WHEN |
---|---|
on-preset-failed | any preset failed |
direct-close
Relay should close the connection immediately.
{
"name": "direct-close"
}
random-timeout
Relay should close the connection in a random timeout.
PARAMS | DESCRIPTION | DEFAULT |
---|---|---|
min | the minimal timeout | 10 |
max | the maximal timeout | 40 |
{
"name": "random-timeout",
"params": {
"min": 10,
"max": 40
}
}
redirect
Relay should redirect data stream to a permanent destination.
PARAMS | DESCRIPTION | DEFAULT |
---|---|---|
host | the destination host | - |
port | the destination port | - |
{
"name": "redirect",
"params": {
"host": "my-log-server",
"port": 80
}
}