Dynamic directory
Overview
dynamic-dir creates a dynamic directory whose children each use a named factory and independent configuration.
Example configuration
This directory contains a temperature child that generates four hourly
readings. It needs no existing source data or external services.
entries: # Children exposed by this directory.
- name: temperature # Appears as /demo/temperature below.
factory: synthetic-timeseries # Generate readings without external data.
config: # Settings for this child.
start: "2024-01-01T00:00:00Z"
end: "2024-01-01T03:00:00Z" # Inclusive: four hourly readings.
interval: 1h
points:
- name: temperature # Output measurement column.
components:
- type: line
offset: 20.0 # Starting temperature.
slope: 0.001 # Increase per second: 3.6 per hour.
Use and behavior
In an initialized pond, save the configuration as directory.yaml, then run:
pond mknod dynamic-dir /demo --config-path directory.yaml
pond list '/demo/*'
pond cat /demo/temperature --format=table
The directory lists temperature; reading that child produces timestamps
from midnight through 03:00 UTC with temperatures 20, 23.6, 27.2, and
30.8. The child is generated on demand, not copied from a source file.
Each entry needs a name, a factory, and that factory's config. The example
uses synthetic-timeseries, but another child can use
a different factory with its own settings. The selected factory validates its
own settings. Directory enumeration does not execute every child factory.
Child identities derive from the parent identity, entry name, factory, and configuration.
Full configuration
Settings
| Field | Accepted type | Required | Default | Description |
|---|---|---|---|---|
entries | array of Dynamic Dir Entry | yes | not specified | List of directory entries to create |
Dynamic Dir Entry
Configuration for a single directory entry
| Field | Accepted type | Required | Default | Description |
|---|---|---|---|---|
config | any JSON value | yes | not specified | Configuration for the specific factory (as raw Value for flexibility) |
factory | string | yes | not specified | Factory type to use for creating this entry |
name | string | yes | not specified | Name of the entry in the directory |