corosync-config-parser
A Rust crate for hassle-free Corosync's configuration file parsing.
Inspired by Kilobyte22/config-parser.
Usage
extern crate corosync_config_parser;
let corosync_example = "
logging {
fileline: off
to_stderr: no
to_logfile: no
logfile: /var/log/cluster/corosync.log
to_syslog: yes
debug: off
timestamp: on
logger_subsys {
subsys: QUORUM
debug: off
}
}
"
.to_string;
let cfg = parse.unwrap;
let subsys = cfg
.matching
.nth
.unwrap
.matching
.nth
.unwrap
.matching
.nth
.unwrap
.get;