OxL Reference

method Principal.isService

The caller is the service of cluster role name (or the node of that id).

Example:

oxl✓ checked in CI
fn main() io {
  let p = Principal.Service("billing-1", "billing,audit")
  print("{p.isService("audit")} {p.isService("web")}")
}
Output
true false
pub(api) fn isService(name: str) -> bool

Complexity. O(1).

Since. 1.0.0-beta

Parameters

NameType
namestr

Returns

bool

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/rpc.oxl:156

See also