method Principal.isService
The caller is the service of cluster role name (or the node of that id).
Example:
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) -> boolComplexity. O(1).
Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
name | str |
Returns
bool
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/rpc.oxl:156