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 linker
  • DepsValidated: dependencies have been validated
  • Resolved: 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

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

Marker type for IRs freshly built by the linker.

pub type Linked

Marker type for IRs with resolved indicators.

pub type Resolved

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

Search Document