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
-
Boolean -
Decimal -
Integer -
String -
List(AcceptedTypes)
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
-
QueryTemplateType( metric_attributes: List(QueryTemplateFilter), name: String, )
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
-
SliType( name: String, query_template_type: QueryTemplateType, metric_attributes: dict.Dict(String, String), filters: List(QueryTemplateFilter), )
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, )