Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/pkg/expr/expr_unary_op.go

27 lines
671 B

package expr
// UnaryOp denotes a unary operation to perform against a single argument.
type UnaryOp int
const (
// UnaryOpInvalid indicates an invalid unary operation. Evaluating a
// UnaryOpInvalid will result in an error.
UnaryOpInvalid UnaryOp = iota
// UnaryOpNOT represents a logical NOT operation over a boolean value.
UnaryOpNOT
)
var unaryOpStrings = [...]string{
UnaryOpInvalid: "INVALID",
UnaryOpNOT: "NOT",
}
// String returns the string representation of op. If op is out of bounds, it
// returns "INVALID."
func (op UnaryOp) String() string {
if op < 0 || int(op) >= len(unaryOpStrings) {
return "INVALID"
}
return unaryOpStrings[op]
}