OxL Reference

enum DynScope

Where an override applies (§14.2): everywhere, or to one role / zone / node / tenant. The most specific layer wins.

Example:

oxl✓ checked in CI
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 DynScope

Since. 1.0.0-beta

Variants

Global

Applies to every node.

Role(name: str)

Applies to the nodes that have the role name.

Zone(name: str)

Applies to the nodes of the zone name.

Node(name: str)

Applies to the node name.

Tenant(name: str)

Applies to the calls of the tenant name.

Defined in: std/core/dynconf.oxl:103

See also