artifact

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProvenanceModel    = "model"
	ProvenanceSnapshot = "snapshot"
	ProvenanceExternal = "external_overlay"
	ProvenanceDefault  = "default"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Loaded

type Loaded struct {
	Metadata        Metadata                         `json:"metadata"`
	Model           model.ResilienceModel            `json:"model"`
	Snapshot        *SnapshotEnvelope                `json:"snapshot,omitempty"`
	Predicates      map[string]predicates.Definition `json:"predicates,omitempty"`
	EndpointWeights map[string]float64               `json:"endpoint_weights,omitempty"`
	PredicateSource string                           `json:"predicate_source"`
	WeightsSource   string                           `json:"weights_source"`
}

func Load

func Load(path string) (Loaded, error)

type Metadata

type Metadata struct {
	Path            string                          `json:"path"`
	Digest          string                          `json:"digest"`
	ArtifactID      string                          `json:"artifact_id,omitempty"`
	ProducedAt      string                          `json:"produced_at,omitempty"`
	Kind            modelcontract.ArtifactKind      `json:"kind"`
	Contract        modelcontract.SupportedContract `json:"contract"`
	SourceType      string                          `json:"source_type"`
	SourceRef       string                          `json:"source_ref"`
	TopologyVersion string                          `json:"topology_version,omitempty"`
}

type SnapshotCounts added in v0.1.1

type SnapshotCounts struct {
	Services  int `json:"services"`
	Edges     int `json:"edges"`
	Endpoints int `json:"endpoints"`
}

type SnapshotCoverage added in v0.1.1

type SnapshotCoverage struct {
	Confidence         float64 `json:"confidence"`
	ServiceSupportMin  int     `json:"service_support_min"`
	EdgeSupportMin     int     `json:"edge_support_min"`
	EndpointSupportMin int     `json:"endpoint_support_min"`
}

type SnapshotDiff added in v0.1.1

type SnapshotDiff struct {
	AddedServices    int `json:"added_services"`
	RemovedServices  int `json:"removed_services"`
	ChangedServices  int `json:"changed_services"`
	AddedEdges       int `json:"added_edges"`
	RemovedEdges     int `json:"removed_edges"`
	ChangedEdges     int `json:"changed_edges"`
	AddedEndpoints   int `json:"added_endpoints"`
	RemovedEndpoints int `json:"removed_endpoints"`
	ChangedEndpoints int `json:"changed_endpoints"`
}

type SnapshotDiscovery added in v0.1.1

type SnapshotDiscovery struct {
	Services  []SnapshotDiscoveryService  `json:"services"`
	Edges     []SnapshotDiscoveryEdge     `json:"edges"`
	Endpoints []SnapshotDiscoveryEndpoint `json:"endpoints"`
	Overlays  []SnapshotOverlay           `json:"overlays,omitempty"`
}

type SnapshotDiscoveryEdge added in v0.2.0

type SnapshotDiscoveryEdge struct {
	ID          string                  `json:"id"`
	From        string                  `json:"from"`
	To          string                  `json:"to"`
	Kind        model.EdgeKind          `json:"kind"`
	Blocking    bool                    `json:"blocking"`
	Support     SnapshotSupport         `json:"support"`
	FirstSeen   string                  `json:"first_seen,omitempty"`
	LastSeen    string                  `json:"last_seen,omitempty"`
	Provenance  []SnapshotProvenance    `json:"provenance,omitempty"`
	Metadata    SnapshotEdgeMetadata    `json:"metadata,omitempty"`
	Resilience  *model.ResiliencePolicy `json:"resilience,omitempty"`
	Observed    *model.ObservedEdge     `json:"observed,omitempty"`
	PolicyScope *model.PolicyScope      `json:"policy_scope,omitempty"`
}

type SnapshotDiscoveryEndpoint added in v0.1.1

type SnapshotDiscoveryEndpoint struct {
	ID           string                   `json:"id"`
	EntryService string                   `json:"entry_service"`
	Method       string                   `json:"method,omitempty"`
	Path         string                   `json:"path,omitempty"`
	Support      SnapshotSupport          `json:"support"`
	FirstSeen    string                   `json:"first_seen,omitempty"`
	LastSeen     string                   `json:"last_seen,omitempty"`
	Provenance   []SnapshotProvenance     `json:"provenance,omitempty"`
	Metadata     SnapshotEndpointMetadata `json:"metadata,omitempty"`
}

type SnapshotDiscoveryService added in v0.2.0

type SnapshotDiscoveryService struct {
	ID         string                           `json:"id"`
	Name       string                           `json:"name"`
	Replicas   int                              `json:"replicas"`
	Support    SnapshotSupport                  `json:"support"`
	FirstSeen  string                           `json:"first_seen,omitempty"`
	LastSeen   string                           `json:"last_seen,omitempty"`
	Provenance []SnapshotProvenance             `json:"provenance,omitempty"`
	Metadata   SnapshotServiceDiscoveryMetadata `json:"metadata,omitempty"`
}

type SnapshotEdgeMetadata added in v0.2.0

type SnapshotEdgeMetadata struct {
	model.CommonMetadata
	Weight *float64 `json:"weight,omitempty"`
}

type SnapshotEndpointMetadata added in v0.1.1

type SnapshotEndpointMetadata struct {
	model.CommonMetadata
	Weight       *float64 `json:"weight,omitempty"`
	PredicateRef string   `json:"predicate_ref,omitempty"`
}

type SnapshotEnvelope

type SnapshotEnvelope struct {
	SnapshotID      string                `json:"snapshot_id"`
	TopologyVersion string                `json:"topology_version"`
	WindowStart     string                `json:"window_start"`
	WindowEnd       string                `json:"window_end"`
	Ingest          SnapshotIngest        `json:"ingest"`
	Counts          SnapshotCounts        `json:"counts"`
	Coverage        SnapshotCoverage      `json:"coverage"`
	Sources         []SnapshotSource      `json:"sources"`
	Diff            SnapshotDiff          `json:"diff"`
	Discovery       SnapshotDiscovery     `json:"discovery"`
	Model           model.ResilienceModel `json:"model"`
	Metadata        SnapshotMetadata      `json:"metadata"`
}

type SnapshotIngest added in v0.1.1

type SnapshotIngest struct {
	Spans        int `json:"spans"`
	Traces       int `json:"traces"`
	DroppedSpans int `json:"dropped_spans"`
	LateSpans    int `json:"late_spans"`
}

type SnapshotMetadata added in v0.1.1

type SnapshotMetadata struct {
	SourceType string                  `json:"source_type"`
	SourceRef  string                  `json:"source_ref"`
	EmittedAt  string                  `json:"emitted_at"`
	Confidence float64                 `json:"confidence"`
	Schema     modelcontract.SchemaRef `json:"schema"`
}

type SnapshotOverlay added in v0.2.0

type SnapshotOverlay struct {
	Name       string `json:"name"`
	Ref        string `json:"ref,omitempty"`
	Precedence int    `json:"precedence"`
}

type SnapshotProvenance added in v0.2.0

type SnapshotProvenance struct {
	Type       string `json:"type"`
	Connector  string `json:"connector,omitempty"`
	Name       string `json:"name,omitempty"`
	Ref        string `json:"ref,omitempty"`
	Precedence int    `json:"precedence,omitempty"`
}

type SnapshotServiceDiscoveryMetadata added in v0.2.0

type SnapshotServiceDiscoveryMetadata struct {
	model.CommonMetadata
	FailureEligible    *bool             `json:"failure_eligible,omitempty"`
	ReplicasOverride   *int              `json:"replicas_override,omitempty"`
	Placements         []model.Placement `json:"placements,omitempty"`
	SharedResourceRefs []string          `json:"shared_resource_refs,omitempty"`
}

type SnapshotSource added in v0.1.1

type SnapshotSource struct {
	Type         string `json:"type"`
	Connector    string `json:"connector,omitempty"`
	Ref          string `json:"ref,omitempty"`
	Observations int    `json:"observations,omitempty"`
}

type SnapshotSupport added in v0.2.0

type SnapshotSupport struct {
	Observations int      `json:"observations"`
	TraceCount   int      `json:"trace_count"`
	Evidence     []string `json:"evidence,omitempty"`
}

Jump to

Keyboard shortcuts

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