Documentation
¶
Overview ¶
Package runtimeinventory defines the dependency-free, secret-free Go wire model for reading Kombify runtime inventory.
Authority ¶
The canonical Inventory schema in Techstack owns this model. This package owns its generated Go type identity and stable JSON field names.
Non-authority ¶
This package does not own server identity, lifecycle transitions, desired state, lease state, provider operations, cleanup evidence, freshness policy, authorization, pagination behavior, or access-link derivation. Techstack is the production authority for those decisions and projections.
Side effects ¶
The package contains data transfer objects only. It performs no I/O and has no side effects.
Persistence ¶
The package does not persist inventory or cursor state.
Concurrency ¶
Values contain no synchronization. Treat DTOs as immutable after publication and do not concurrently mutate shared slices or pointed-to timestamps.
Secrets ¶
These DTOs intentionally expose no metadata bags, credential references, provider credentials, tokens, SSH material, route IDs, endpoint references, commands, or logs. Producers must sanitize all strings and access URLs before constructing a value.
Index ¶
- type AccessServiceLink
- type Addresses
- type Availability
- type Channel
- type CleanupProjection
- type DesiredProjection
- type Freshness
- type LeaseProjection
- type LifecycleProjection
- type ObservedState
- type Platform
- type ResourceMetric
- type ResourceMetrics
- type Server
- type ServerAccessContext
- type ServerHealth
- type ServerList
- type Service
- type ServiceLink
- type ServiceList
- type StackKit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessServiceLink ¶
type AccessServiceLink struct {
ServiceID string `json:"service_id"`
ServiceName string `json:"service_name"`
URL string `json:"url"`
Mode string `json:"mode"`
Health string `json:"health"`
}
AccessServiceLink is a reachable service link in a server access context.
type Addresses ¶
type Addresses struct {
PublicIPs []string `json:"public_ips"`
PrivateIPs []string `json:"private_ips"`
LocalIPs []string `json:"local_ips"`
Domains []string `json:"domains"`
}
Addresses contains sanitized network addresses and DNS names.
type Availability ¶
type Availability struct {
State string `json:"state"`
ReasonCode string `json:"reason_code,omitempty"`
}
Availability reports whether a sanitized access context is currently usable.
type Channel ¶
type Channel struct {
Type string `json:"type"`
Role string `json:"role"`
State string `json:"state"`
ObservedAt *time.Time `json:"observed_at,omitempty"`
}
Channel is sanitized connection-channel state without an endpoint reference.
type CleanupProjection ¶
type CleanupProjection struct {
State string `json:"state"`
ProviderAbsenceVerified bool `json:"provider_absence_verified"`
VerifiedAt *time.Time `json:"verified_at,omitempty"`
}
CleanupProjection reports evidence-qualified provider cleanup state.
type DesiredProjection ¶
type DesiredProjection struct {
State string `json:"state"`
ReasonCode string `json:"reason_code,omitempty"`
ChangedAt *time.Time `json:"changed_at,omitempty"`
}
DesiredProjection is the user-owned desired-state read projection.
type Freshness ¶
type Freshness struct {
State string `json:"state"`
AgeSeconds *int64 `json:"age_seconds,omitempty"`
StaleAfterSeconds int64 `json:"stale_after_seconds"`
ReasonCode string `json:"reason_code,omitempty"`
}
Freshness qualifies an observation using the owning authority's freshness policy.
type LeaseProjection ¶
LeaseProjection contains only an opaque runtime-lease identity and state.
type LifecycleProjection ¶
type LifecycleProjection struct {
State string `json:"state"`
ReasonCode string `json:"reason_code,omitempty"`
ChangedAt *time.Time `json:"changed_at,omitempty"`
}
LifecycleProjection is the control-plane lifecycle read projection.
type ObservedState ¶
type ObservedState struct {
State string `json:"state"`
ReasonCode string `json:"reason_code,omitempty"`
ChangedAt *time.Time `json:"changed_at,omitempty"`
ObservedAt *time.Time `json:"observed_at,omitempty"`
}
ObservedState is a freshness-qualified runtime observation.
type Platform ¶
type Platform struct {
OS string `json:"os,omitempty"`
OSVersion string `json:"os_version,omitempty"`
Arch string `json:"arch,omitempty"`
}
Platform contains sanitized operating-system and architecture labels.
type ResourceMetric ¶
type ResourceMetric struct {
Status string `json:"status"`
Value *float64 `json:"value,omitempty"`
Unit string `json:"unit,omitempty"`
}
ResourceMetric is one heartbeat-observed resource figure. Status is ok with a value, stale when the heartbeat is outside the freshness window, or unknown when the server has not reported the figure.
type ResourceMetrics ¶
type ResourceMetrics struct {
CPUPercent ResourceMetric `json:"cpu_percent"`
MemoryPercent ResourceMetric `json:"memory_percent"`
DiskPercent ResourceMetric `json:"disk_percent"`
UptimeSeconds ResourceMetric `json:"uptime_seconds"`
}
ResourceMetrics carries the freshness-qualified resource figures of one server.
type Server ¶
type Server struct {
ID string `json:"id"`
StackID string `json:"stack_id,omitempty"`
Name string `json:"name"`
ObservedAt *time.Time `json:"observed_at"`
Freshness Freshness `json:"freshness"`
InventoryRevision int64 `json:"inventory_revision"`
Addresses Addresses `json:"addresses"`
Platform Platform `json:"platform"`
StackKit StackKit `json:"stackkit"`
Provider string `json:"provider,omitempty"`
Lifecycle LifecycleProjection `json:"lifecycle"`
Desired DesiredProjection `json:"desired"`
Lease LeaseProjection `json:"lease"`
Cleanup CleanupProjection `json:"cleanup"`
Connection ObservedState `json:"connection"`
Health ObservedState `json:"health"`
Metrics ResourceMetrics `json:"metrics"`
}
Server is the canonical secret-free runtime-server read model.
type ServerAccessContext ¶
type ServerAccessContext struct {
ServerID string `json:"server_id"`
ObservedAt *time.Time `json:"observed_at"`
Freshness Freshness `json:"freshness"`
InventoryRevision int64 `json:"inventory_revision"`
Availability Availability `json:"availability"`
Connection ObservedState `json:"connection"`
Addresses Addresses `json:"addresses"`
Channels []Channel `json:"channels"`
ServiceLinks []AccessServiceLink `json:"service_links"`
}
ServerAccessContext contains sanitized connection and service-link data for an authorized operator.
type ServerHealth ¶
type ServerHealth struct {
ServerID string `json:"server_id"`
ObservedAt *time.Time `json:"observed_at"`
Freshness Freshness `json:"freshness"`
InventoryRevision int64 `json:"inventory_revision"`
Connection ObservedState `json:"connection"`
Health ObservedState `json:"health"`
Metrics ResourceMetrics `json:"metrics"`
}
ServerHealth is the compact health projection for one server.
type ServerList ¶
type ServerList struct {
ObservedAt time.Time `json:"observed_at"`
Freshness Freshness `json:"freshness"`
InventoryRevision int64 `json:"inventory_revision"`
CollectionCursor string `json:"collection_cursor"`
NextCursor string `json:"next_cursor,omitempty"`
PageSize int `json:"page_size"`
Servers []Server `json:"servers"`
}
ServerList is one bounded server-collection page.
type Service ¶
type Service struct {
ID string `json:"id"`
StackID string `json:"stack_id"`
ServerID string `json:"server_id"`
Key string `json:"key"`
Name string `json:"name"`
ManagementState string `json:"management_state,omitempty"`
DesiredState string `json:"desired_state"`
ObservedState string `json:"observed_state"`
ObservedAt *time.Time `json:"observed_at"`
Freshness Freshness `json:"freshness"`
InventoryRevision int64 `json:"inventory_revision"`
Health ObservedState `json:"health"`
StackKit StackKit `json:"stackkit"`
Links []ServiceLink `json:"links"`
AllowedActions []string `json:"allowed_actions"`
EvidenceRef string `json:"evidence_ref,omitempty"`
Source string `json:"source"`
}
Service is the canonical secret-free runtime-service read model. ManagementState reports definition ownership: managed for a declared target, observed for discovery without one. An omitted value is unreported. It is independent of desired state, observed state, and health.
type ServiceLink ¶
ServiceLink is a sanitized HTTP(S) access link without query or fragment secrets.
type ServiceList ¶
type ServiceList struct {
ObservedAt time.Time `json:"observed_at"`
Freshness Freshness `json:"freshness"`
InventoryRevision int64 `json:"inventory_revision"`
CollectionCursor string `json:"collection_cursor"`
NextCursor string `json:"next_cursor,omitempty"`
PageSize int `json:"page_size"`
Services []Service `json:"services"`
}
ServiceList is one bounded service-collection page.