reaction/tests/test-conf/test-virtual.jsonnet
ppom 7cbf482e4d
plugin improvements
- fix panic of channel(0)
- cleaner plugin interface with one level of Result
- standalone metadata for stream plugins
- new test for plugin virtual
2025-12-07 12:00:00 +01:00

58 lines
1 KiB
Jsonnet

{
patterns: {
num: {
regex: @"[0-9]+",
},
all: {
regex: @".*"
}
},
plugins: [
{
path: "/home/ppom/prg/reaction/target/debug/reaction-plugin-virtual",
}
],
streams: {
s0: {
cmd: ["bash", "-c", "for i in $(seq 4); do echo $i; sleep 0.1; done; sleep 1.2"],
filters: {
f0: {
regex: ["^<num>$"],
actions: {
a0: {
type: "virtual",
options: {
send: "a0 <num>",
to: "s1",
}
},
b0: {
type: "virtual",
options: {
send: "b0 <num>",
to: "s1",
},
after: "600ms",
},
},
},
},
},
s1: {
type: "virtual",
options: {},
filters: {
f1: {
regex: ["^<all>$"],
actions: {
a1: {
cmd: ['sh', '-c', 'echo <all> >>./log'],
},
},
},
},
},
},
}