caffeine_lang/linker/ir
Types
Marker type for IRs with validated dependencies.
pub type DepsValidated
Internal representation of a parsed expectation with metadata and values.
The phantom type parameter phase tracks pipeline progress:
Linked: freshly built by the linkerDepsValidated: dependencies have been validatedResolved: indicators have been resolved by semantic analysis
pub type IntermediateRepresentation(phase) {
IntermediateRepresentation(
metadata: IntermediateRepresentationMetaData,
unique_identifier: String,
values: List(helpers.ValueTuple),
slo: SloFields,
vendor: option.Option(vendor.Vendor),
)
}
Constructors
-
IntermediateRepresentation( metadata: IntermediateRepresentationMetaData, unique_identifier: String, values: List(helpers.ValueTuple), slo: SloFields, vendor: option.Option(vendor.Vendor), )
Metadata associated with an intermediate representation including organization and service identifiers. Fields use newtype wrappers to prevent accidental mixing of identifier kinds.
pub type IntermediateRepresentationMetaData {
IntermediateRepresentationMetaData(
friendly_label: identifiers.ExpectationLabel,
org_name: identifiers.OrgName,
service_name: identifiers.ServiceName,
measurement_name: identifiers.MeasurementName,
team_name: identifiers.TeamName,
misc: dict.Dict(String, List(String)),
)
}
Constructors
-
IntermediateRepresentationMetaData( friendly_label: identifiers.ExpectationLabel, org_name: identifiers.OrgName, service_name: identifiers.ServiceName, measurement_name: identifiers.MeasurementName, team_name: identifiers.TeamName, misc: dict.Dict(String, List(String)), )Arguments
- misc
-
Metadata specific to any given expectation.
Structured SLO artifact fields extracted from raw values.
description is the SLO description text (sourced from ### doc comments
preceding the expectation in the source file). Datadog codegen renders it
into the description attribute, optionally combined with the runbook link.
pub type SloFields {
SloFields(
threshold: Float,
indicators: dict.Dict(String, String),
window_in_days: Int,
evaluation: option.Option(String),
tags: List(#(String, String)),
runbook: option.Option(String),
depends_on: option.Option(
dict.Dict(dependency.DependencyRelationType, List(String)),
),
description: option.Option(String),
)
}
Constructors
-
SloFields( threshold: Float, indicators: dict.Dict(String, String), window_in_days: Int, evaluation: option.Option(String), tags: List(#(String, String)), runbook: option.Option(String), depends_on: option.Option( dict.Dict(dependency.DependencyRelationType, List(String)), ), description: option.Option(String), )