policy engine

Policy Engine allows to dynamically evaluate and enforce rules written in a simple expression-like language.

Note: This is still under development.

Example

```rust extern crate policyengine;

use policyengine::services::Policy; fn main() {

let user_policy = "metric_a >= 100 && metric_b = 123";
let mut policy = Policy::new();

policy.predicate.rule = user_policy.to_string();

let user_metric = "metric_a = 456 && metric_b = 123";
policy.predicate.expression = user_metric.to_string();

policy.action.on_success.path = "/path/to/success".to_string();
policy.action.on_failure.path = "/path/to/failure".to_string();

policy.run(); //returns true

} ``` See examples for more.

Currently supported operands

>, <, >=, <=, ==, !=