Generators
A generator is a self-contained data source that produces values that are mixed in with the primary data source. Examples of generators are counters that incrememnt at a fixed interval or booleans updated based on a recurring schedule.
Here's an example of a generator that updates a unix timestamp every 5 seconds:
- AdapterScript
generators:
timestamp:
type: datetime
format: X
interval: 5s
Using the example above, the generator is defined by the unique name timestamp
, and the body of the generator is its
configuration. The type
option specifies what kind of generator is being defined, and the remaining options are
specific to the generator type.
Multiple generators of the same type can be specified, for example different kinds of dates can be generated:
- AdapterScript
generators:
timestamp:
type: datetime
format: X
interval: 5s
isodate:
type: datetime
format: YYYY-MM-DDTHH:mm:ss
interval: 5s