id_effect_console 0.10.1

Operator console for id_effect services: live fibers, jobs and queues behind authorization guards
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Prints whether a console bound to each address needs an authorization guard.
//!
//! `cargo run -p id_effect_console --example 010_bind`

use id_effect_console::ConsoleConfig;

fn main() {
  for bind in ["127.0.0.1:9090", "[::1]:9090", "0.0.0.0:9090"] {
    let config = ConsoleConfig::new(bind.parse().expect("socket address"));
    let access = if config.requires_guard() {
      "guard required"
    } else {
      "local only"
    };
    println!("{:<16} {access}", config.bind());
  }
}