caffeine_lang/types/ast

Types

AcceptedTypes is a union of all the types that can be used as filters. It is recursive to allow for nested filters. This may be a bug in the future since it seems it may infinitely recurse.

pub type AcceptedTypes {
  Boolean
  Decimal
  Integer
  String
  List(AcceptedTypes)
}

Constructors

An organization represents the union of instantiations and specifications.

pub type Organization {
  Organization(
    teams: List(Team),
    service_definitions: List(Service),
  )
}

Constructors

  • Organization(
      teams: List(Team),
      service_definitions: List(Service),
    )

A QueryTemplateFilter is a single definition of a filter that can be applied to a query template to narrow down its scope.

pub type QueryTemplateFilter {
  QueryTemplateFilter(
    attribute_name: String,
    attribute_type: AcceptedTypes,
  )
}

Constructors

  • QueryTemplateFilter(
      attribute_name: String,
      attribute_type: AcceptedTypes,
    )
pub type QueryTemplateType {
  QueryTemplateType(
    metric_attributes: List(QueryTemplateFilter),
    name: String,
  )
}

Constructors

A service is a named entity that supports a set of SLO types.

pub type Service {
  Service(name: String, supported_sli_types: List(SliType))
}

Constructors

  • Service(name: String, supported_sli_types: List(SliType))

A SliType is a named entity that represents the generic (as possible) definition of an SLI that references a query template.

pub type SliType {
  SliType(
    name: String,
    query_template_type: QueryTemplateType,
    metric_attributes: dict.Dict(String, String),
    filters: List(QueryTemplateFilter),
  )
}

Constructors

An SLO is an expectation set by stakeholders upon a metric emulating the user experience as best as possible.

pub type Slo {
  Slo(
    filters: dict.Dict(String, String),
    threshold: Float,
    sli_type: String,
    service_name: String,
    window_in_days: Int,
  )
}

Constructors

  • Slo(
      filters: dict.Dict(String, String),
      threshold: Float,
      sli_type: String,
      service_name: String,
      window_in_days: Int,
    )

A team is a named entity that owns a set of SLOs.

pub type Team {
  Team(name: String, slos: List(Slo))
}

Constructors

  • Team(name: String, slos: List(Slo))
Search Document