runtimeobservation

package
v0.42.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package runtimeobservation projects the CUE-owned provider-neutral runtime observation contract onto the standalone Go CLI and MCP surfaces.

Index

Constants

View Source
const SchemaVersionV2 = "stackkit.runtime-observation/v2"
View Source
const VantageVerifierHost = "verifier-host"

Variables

This section is empty.

Functions

This section is empty.

Types

type EvidenceLink struct {
	Kind   string `json:"kind"`
	Ref    string `json:"ref"`
	Digest string `json:"digest,omitempty"`
}

type HTTPProbeEvidence

type HTTPProbeEvidence struct {
	Vantage           string          `json:"vantage"`
	ObservedAt        time.Time       `json:"observedAt"`
	WorkloadRef       string          `json:"workloadRef,omitempty"`
	ServiceRef        string          `json:"serviceRef"`
	RouteRef          string          `json:"routeRef"`
	URL               string          `json:"url"`
	Method            string          `json:"method"`
	Status            HTTPProbeStatus `json:"status"`
	Reached           bool            `json:"reached"`
	StatusCode        int             `json:"statusCode,omitempty"`
	FailureClass      string          `json:"failureClass,omitempty"`
	ObservationRef    string          `json:"observationRef"`
	ObservationDigest string          `json:"observationDigest"`
}

HTTPProbeEvidence is one plan-bound client-route observation. ObservedAt is kept on the item because a status projection may combine historical runtime evidence with a fresh, explicitly requested verifier-host probe.

type HTTPProbeStatus

type HTTPProbeStatus string

HTTPProbeStatus is the result of an explicitly requested HTTP probe from the host running the verifier. It describes transport reachability of the plan-bound route only; it is not a claim about another client or network.

const (
	HTTPProbeReachable   HTTPProbeStatus = "reachable"
	HTTPProbeUnreachable HTTPProbeStatus = "unreachable"
)

type HealthEvidence

type HealthEvidence struct {
	RequirementID     string `json:"requirementId"`
	TargetRef         string `json:"targetRef"`
	SourceRef         string `json:"sourceRef,omitempty"`
	Status            string `json:"status"`
	ObservationRef    string `json:"observationRef"`
	ObservationDigest string `json:"observationDigest"`
	SiteRef           string `json:"siteRef"`
	NodeRef           string `json:"nodeRef"`
}

type HealthStatus

type HealthStatus string
const (
	HealthHealthy     HealthStatus = "healthy"
	HealthUnhealthy   HealthStatus = "unhealthy"
	HealthStarting    HealthStatus = "starting"
	HealthNotRequired HealthStatus = "not-required"
	HealthUnknown     HealthStatus = "unknown"
)

type Identity

type Identity struct {
	StackID             string `json:"stackId"`
	PlanHash            string `json:"planHash"`
	ApplyResultHash     string `json:"applyResultHash"`
	RunID               string `json:"runId"`
	SiteRef             string `json:"siteRef"`
	NodeRef             string `json:"nodeRef"`
	ExecutionChannelRef string `json:"executionChannelRef"`
}

type Observation

type Observation struct {
	SchemaVersion string              `json:"schemaVersion"`
	Phase         Phase               `json:"phase"`
	Source        Source              `json:"source"`
	ObservedAt    time.Time           `json:"observedAt"`
	Live          bool                `json:"live"`
	Identity      Identity            `json:"identity"`
	Services      []Service           `json:"services"`
	Runtime       []RuntimeEvidence   `json:"runtime"`
	Health        []HealthEvidence    `json:"health"`
	HTTPProbes    []HTTPProbeEvidence `json:"httpProbes,omitempty"`
	EvidenceLinks []EvidenceLink      `json:"evidenceLinks"`
}

func (Observation) Canonical

func (o Observation) Canonical() ([]byte, error)

func (Observation) Digest

func (o Observation) Digest() (string, error)

func (Observation) Validate

func (o Observation) Validate() error

type Phase

type Phase string
const (
	PhaseApply  Phase = "apply"
	PhaseStatus Phase = "status"
	PhaseVerify Phase = "verify"
)

type RuntimeEvidence

type RuntimeEvidence struct {
	RequirementID       string `json:"requirementId"`
	InstanceRef         string `json:"instanceRef"`
	Status              string `json:"status"`
	ObservationRef      string `json:"observationRef"`
	ObservationDigest   string `json:"observationDigest"`
	SiteRef             string `json:"siteRef"`
	NodeRef             string `json:"nodeRef"`
	ExecutionChannelRef string `json:"executionChannelRef"`
}

type Service

type Service struct {
	Ref       string        `json:"ref"`
	URL       string        `json:"url,omitempty"`
	Status    ServiceStatus `json:"status"`
	Health    HealthStatus  `json:"health"`
	HealthRef string        `json:"healthRef,omitempty"`
}

type ServiceStatus

type ServiceStatus string
const (
	StatusRunning  ServiceStatus = "running"
	StatusStopped  ServiceStatus = "stopped"
	StatusStarting ServiceStatus = "starting"
	StatusError    ServiceStatus = "error"
	StatusUnknown  ServiceStatus = "unknown"
)

type Source

type Source string
const (
	SourceLocalRuntime          Source = "local-runtime"
	SourceStandardProcess       Source = "standard-process"
	SourceVerifiedApplyEvidence Source = "verified-apply-evidence"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL