caffeine_query_language/resolver

Types

Set of valid comparison operators. FUTURE: possible we may want a good ol’ ‘==’ 🤷‍♂️. Not yet atleast and YAGNI.

pub type Comparator {
  LessThan
  LessThanOrEqualTo
  GreaterThan
  GreaterThanOrEqualTo
}

Constructors

  • LessThan
  • LessThanOrEqualTo
  • GreaterThan
  • GreaterThanOrEqualTo

Supported primitive query types that can be resolved from CQL expressions. Each primitive represents a specific SLO calculation pattern.

pub type Primitives {
  GoodOverTotal(numerator: parser.Exp, denominator: parser.Exp)
  TimeSlice(
    comparator: Comparator,
    interval_in_seconds: Int,
    threshold: Float,
    query: String,
  )
}

Constructors

  • GoodOverTotal(numerator: parser.Exp, denominator: parser.Exp)

    Good over total requires a top level division operator. Represents an SLO where the numerator is the “good” events and the denominator is the “total” events.

  • TimeSlice(
      comparator: Comparator,
      interval_in_seconds: Int,
      threshold: Float,
      query: String,
    )
Search Document