caffeine_lang/linker/ir

Types

Artifact-specific data stored as a dict from artifact type to fields.

pub type ArtifactData {
  ArtifactData(
    fields: dict.Dict(artifacts.ArtifactType, ArtifactFields),
  )
}

Constructors

Wrapper for artifact-specific field data.

pub type ArtifactFields {
  SloArtifactFields(SloFields)
  DependencyArtifactFields(DependencyFields)
}

Constructors

Structured dependency artifact fields extracted from raw values.

pub type DependencyFields {
  DependencyFields(
    relations: dict.Dict(
      artifacts.DependencyRelationType,
      List(String),
    ),
    tags: List(#(String, String)),
  )
}

Constructors

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,
    artifact_refs: List(artifacts.ArtifactType),
    values: List(helpers.ValueTuple),
    artifact_data: ArtifactData,
    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,
    blueprint_name: identifiers.BlueprintName,
    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.

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),
  )
}

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),
    )
Search Document