-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Consider the configuration of a typical metrics server:
metricsEnabled* {.
desc: "Enable the metrics server"
defaultValue: false
name: "metrics" .}: bool
metricsAddress* {.
desc: "Listening address of the metrics server"
defaultValue: defaultAdminListenAddress
defaultValueDesc: $defaultAdminListenAddressDesc
name: "metrics-address" .}: IpAddress
metricsPort* {.
desc: "Listening HTTP port of the metrics server"
defaultValue: 8008
name: "metrics-port" .}: Port
There are three options here that are related but not the same - such metrics would conveniently be packed into a MetricsConf object that could be reused in various configurations:
type MyConf = object
metrics {.flatten.}: MetricsConf
MyConf would then traverse metrics as if its options were "top-level" options in MyConf.
Metadata
Metadata
Assignees
Labels
No labels