enum DynScope
Where an override applies (§14.2): everywhere, or to one role / zone / node / tenant. The most specific layer wins.
Example:
dynamic Limits {
rps: u32 = 100
title: str = "shop"
}
fn main() io {
let l = Limits.get()
l.rps.set(200)!
l.rps.set(300, .Role("api"))!
print("{l.rps.get()}")
l.rps.unset(.Role("api"))!
print("{l.rps.get()}")
}Output
200 200
pub(api) enum DynScopeSince. 1.0.0-beta
Variants
Global | Applies to every node. |
Role(name: str) | Applies to the nodes that have the role |
Zone(name: str) | Applies to the nodes of the zone |
Node(name: str) | Applies to the node |
Tenant(name: str) | Applies to the calls of the tenant |
Defined in: std/core/dynconf.oxl:103