gval
Gval (Go eVALuate) provides support for evaluating arbitrary expressions, in particular Go-like expressions.
Gval can evaluate expressions with parameters, arimethetic, logical, and string operations:
- basic expression: 10 > 0
- parameterized expression: foo > 0
- nested parameterized expression: foo.bar > 0
- arithmetic expression: (requests_made * requests_succeeded / 100) >= 90
- string expression: http_response_body == "service is ok"
- float64 expression: (mem_used / total_mem) * 100
It also provides support for JSON Path support, allowing you to look inside JSON structures.
Back to top