1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
# Threaded random generator source
This example source plugin generates `bytes()` random bytes every `freq()` seconds.
The output is represented as a hexadecimal string in a generated log message.
`type()` can be `random` or `urandom`, the default is `random`.
The plugin is implemented on the top of `LogThreadedSourceDriver`. It provides a separate thread, so blocking function
calls are allowed.
### Usage
```
source s_generator {
example-random-generator(
bytes(32)
freq(0.5)
type(random)
);
};
log {
source(s_generator);
destination {
file("/dev/stdout");
};
};
```
|