Documentation
¶
Index ¶
- Constants
- func PersistentVolumeHostPath(diskDirectory, uuid, name, scope string) string
- type ContainerState
- type DB
- func (d *DB) AddPersistentVolumeCleanupUUID(uuid string) error
- func (d *DB) CheckLocalRegistryCollision(reg *models.Registry) error
- func (d *DB) ClearAllControllerVolumeMounts() error
- func (d *DB) ClearControllerKnowledge() error
- func (d *DB) ClearControllerMicroserviceRuntimeFields() error
- func (d *DB) ClearControllerMicroservices() error
- func (d *DB) ClearControllerModels() error
- func (d *DB) ClearControllerRegistries() error
- func (d *DB) ClearControllerRuntimeClasses() error
- func (d *DB) ClearKnowledgeRefs(msUUID string) error
- func (d *DB) ClearLocalRuntimeClasses() error
- func (d *DB) ClearLocalWorkloadRuntimeFields() error
- func (d *DB) ClearLocalWorkloads() error
- func (d *DB) ClearRuntimeContainerRefs(scope string) error
- func (d *DB) ClearServiceAccountTokens() error
- func (d *DB) Close() error
- func (d *DB) Conn() *sql.DB
- func (d *DB) CountKnowledgeRefs(name string) (int, error)
- func (d *DB) CountModelRefs(name string) (int, error)
- func (d *DB) DeleteAgentPrivateKey() error
- func (d *DB) DeleteControllerVolumeMount(uuid string) error
- func (d *DB) DeleteEdgeGuardSignature() error
- func (d *DB) DeleteKnowledgeRefs(name string) error
- func (d *DB) DeleteLocalKnowledge(name string) error
- func (d *DB) DeleteLocalModel(name string) error
- func (d *DB) DeleteLocalRegistry(id int) error
- func (d *DB) DeleteLocalRuntimeClass(name string) error
- func (d *DB) DeleteLocalWorkload(id string) error
- func (d *DB) DeleteModelRefs(name string) error
- func (d *DB) DeletePersistentVolume(uuid, name string) error
- func (d *DB) DeleteRuntimeContainerRef(msUUID, scope string) error
- func (d *DB) DeleteSharedPersistentVolumes(name string) error
- func (d *DB) DeleteSystemControlPlane() error
- func (d *DB) DeleteWorkloadModelRefs(msUUID string) error
- func (d *DB) DiskDirectory() string
- func (d *DB) EnsureDefaultControllerRegistries() error
- func (d *DB) EnsureDefaultLocalRegistries() error
- func (d *DB) FindLocalWorkloadsByAppAndName(application, name string) ([]*models.LocalDeployedMicroservice, error)
- func (d *DB) GetAgentPrivateKey() (privateKeyB64 string, found bool, err error)
- func (d *DB) GetControllerKnowledgeByName(name string) (*models.ControllerKnowledge, error)
- func (d *DB) GetControllerKnowledgeByUUID(uuid string) (*models.ControllerKnowledge, error)
- func (d *DB) GetControllerModelByName(name string) (*models.ControllerModel, error)
- func (d *DB) GetControllerRegistry(id int) (*models.Registry, error)
- func (d *DB) GetControllerRuntimeClass(name string) (*models.ControllerRuntimeClass, error)
- func (d *DB) GetControllerVolumeMountByUUID(uuid string) (*VolumeMountRecord, error)
- func (d *DB) GetEdgeGuardSignature() (signature string, found bool, err error)
- func (d *DB) GetLocalKnowledge(name string) (*models.LocalKnowledge, error)
- func (d *DB) GetLocalModel(name string) (*models.LocalModel, error)
- func (d *DB) GetLocalRegistry(id int) (*models.Registry, error)
- func (d *DB) GetLocalRuntimeClass(name string) (*models.LocalRuntimeClass, error)
- func (d *DB) GetLocalWorkload(id string) (*models.LocalDeployedMicroservice, error)
- func (d *DB) GetPersistentVolume(uuid, name string) (*PersistentVolumeRecord, error)
- func (d *DB) GetRuntimeContainerRef(msUUID, scope string) (*ContainerState, error)
- func (d *DB) GetSystemControlPlane() (*models.ControlPlaneDeployment, bool, error)
- func (d *DB) InsertKnowledgeRefs(msUUID string, names []string) error
- func (d *DB) IsManagedFleetRuntimeClass(name string, provisioned bool) (bool, error)
- func (d *DB) ListActiveServiceAccountTokens() ([]*models.ServiceAccountToken, error)
- func (d *DB) ListKnowledgeRefs(msUUID string) ([]string, error)
- func (d *DB) ListLocalKnowledge() ([]*models.LocalKnowledge, error)
- func (d *DB) ListLocalModels() ([]*models.LocalModel, error)
- func (d *DB) ListLocalRuntimeClasses() ([]*models.LocalRuntimeClass, error)
- func (d *DB) ListLocalWorkloads() ([]*models.LocalDeployedMicroservice, error)
- func (d *DB) ListPersistentVolumeCleanupUUIDs() ([]string, error)
- func (d *DB) ListPersistentVolumes() ([]PersistentVolumeRecord, error)
- func (d *DB) ListPersistentVolumesForUUID(uuid string) ([]PersistentVolumeRecord, error)
- func (d *DB) ListPruneKeepKnowledgeNames(includeWorkloadRefs bool) ([]string, error)
- func (d *DB) ListPruneKeepModelNames(includeWorkloadRefs bool) ([]string, error)
- func (d *DB) ListReferencedModelNames() ([]string, error)
- func (d *DB) ListServiceAccountTokens() ([]*models.ServiceAccountToken, error)
- func (d *DB) ListSharedPersistentVolumeConsumers(name string) ([]PersistentVolumeRecord, error)
- func (d *DB) ListUnreferencedWorkloadVolumes() ([]UnreferencedPersistentVolume, error)
- func (d *DB) LoadAllControllerVolumeMounts() ([]VolumeMountRecord, error)
- func (d *DB) LoadControllerKnowledge() ([]*models.ControllerKnowledge, error)
- func (d *DB) LoadControllerMicroservices() ([]*models.Microservice, error)
- func (d *DB) LoadControllerModels() ([]*models.ControllerModel, error)
- func (d *DB) LoadControllerRegistries() ([]*models.Registry, error)
- func (d *DB) LoadControllerRuntimeClasses() ([]*models.ControllerRuntimeClass, error)
- func (d *DB) LoadLocalRegistries() ([]*models.Registry, error)
- func (d *DB) LookupRegistry(id int) (*models.Registry, error)
- func (d *DB) MarkPersistentVolumesUnreferenced(uuid string) error
- func (d *DB) NextLocalRegistryID() (int, error)
- func (d *DB) Open(dir string) error
- func (d *DB) PersistentVolumeKeepSet(listedPrivateUUIDs, listedSharedNames []string) (PersistentVolumeKeepSet, error)
- func (d *DB) PrivateVolumeUUIDKept(uuid string, listedContainerUUIDs []string) (bool, error)
- func (d *DB) ReplaceAllControllerVolumeMounts(records []VolumeMountRecord) error
- func (d *DB) ReplaceKnowledgeRefs(msUUID string, names []string) error
- func (d *DB) ReplaceWorkloadModelRefs(msUUID string, names []string) error
- func (d *DB) RevokeAllServiceAccountTokens(revokedAtSec int64) error
- func (d *DB) RevokeServiceAccountToken(jti string, revokedAtSec int64) error
- func (d *DB) SaveControllerKnowledge(items []*models.ControllerKnowledge) error
- func (d *DB) SaveControllerMicroservices(microservices []*models.Microservice) error
- func (d *DB) SaveControllerModels(items []*models.ControllerModel) error
- func (d *DB) SaveControllerRegistries(registries []*models.Registry) error
- func (d *DB) SaveControllerRuntimeClasses(items []*models.ControllerRuntimeClass) error
- func (d *DB) SeedPersistentVolumesFromDisk(diskDirectory, cpUUID string) error
- func (d *DB) SharedVolumeNameKept(name string, listedSharedNames []string) (bool, error)
- func (d *DB) UpsertAgentPrivateKey(privateKeyB64 string) error
- func (d *DB) UpsertControllerKnowledge(item *models.ControllerKnowledge) error
- func (d *DB) UpsertControllerRegistry(reg *models.Registry) error
- func (d *DB) UpsertControllerVolumeMount(rec VolumeMountRecord) error
- func (d *DB) UpsertEdgeGuardSignature(jwt string) error
- func (d *DB) UpsertLocalKnowledge(k *models.LocalKnowledge) error
- func (d *DB) UpsertLocalModel(m *models.LocalModel) error
- func (d *DB) UpsertLocalRegistry(reg *models.Registry) error
- func (d *DB) UpsertLocalRuntimeClass(rc *models.LocalRuntimeClass) error
- func (d *DB) UpsertLocalWorkload(ms *models.LocalDeployedMicroservice) error
- func (d *DB) UpsertPersistentVolume(uuid, name, kind, scope, hostPath string) error
- func (d *DB) UpsertPersistentVolumesFromMappings(uuid, kind string, mappings []*models.VolumeMapping) error
- func (d *DB) UpsertRuntimeContainerRef(msUUID, scope, workloadID, sandboxID string) error
- func (d *DB) UpsertServiceAccountToken(token *models.ServiceAccountToken) error
- func (d *DB) UpsertSystemControlPlane(dep *models.ControlPlaneDeployment) error
- type PersistentVolumeKeepSet
- type PersistentVolumeRecord
- type UnreferencedPersistentVolume
- type VolumeMountRecord
Constants ¶
const ( // PersistentVolumeKindWorkload is a user or controller microservice volume. PersistentVolumeKindWorkload = "workload" // PersistentVolumeKindControlPlane is an on-node controller volume. PersistentVolumeKindControlPlane = "controlplane" )
const ( RuntimeScopeController = "controller" RuntimeScopeLocal = "local" )
Runtime container ref scopes stored in runtime_container_refs.scope.
const ModelRefKindWorkload = "workload"
ModelRefKindWorkload is the model_refs.kind value for a microservice catalog bind.
Variables ¶
This section is empty.
Functions ¶
func PersistentVolumeHostPath ¶ added in v1.1.0
PersistentVolumeHostPath returns the on-disk directory for a persistent VOLUME.
Types ¶
type ContainerState ¶
ContainerState holds workload and sandbox container IDs for a microservice at a scope.
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB wraps the SQLite database connection
func (*DB) AddPersistentVolumeCleanupUUID ¶ added in v1.1.0
AddPersistentVolumeCleanupUUID records a reserved cleanup bit for later explicit orphan prune. It does not delete files or start a sweeper.
func (*DB) CheckLocalRegistryCollision ¶ added in v1.1.0
CheckLocalRegistryCollision returns a validate error when id exists with a different (type, url).
func (*DB) ClearAllControllerVolumeMounts ¶
ClearAllControllerVolumeMounts removes all controller volume mount rows (used on deprovision).
func (*DB) ClearControllerKnowledge ¶ added in v1.1.0
ClearControllerKnowledge removes all controller Knowledge rows.
func (*DB) ClearControllerMicroserviceRuntimeFields ¶
ClearControllerMicroserviceRuntimeFields clears ephemeral runtime columns while keeping spec rows.
func (*DB) ClearControllerMicroservices ¶
ClearControllerMicroservices removes all controller microservice rows (used on deprovision).
func (*DB) ClearControllerModels ¶ added in v1.1.0
ClearControllerModels removes all controller model rows.
func (*DB) ClearControllerRegistries ¶
ClearControllerRegistries removes all controller registry rows (used on deprovision).
func (*DB) ClearControllerRuntimeClasses ¶ added in v1.1.0
ClearControllerRuntimeClasses removes all fleet RuntimeClass rows.
func (*DB) ClearKnowledgeRefs ¶ added in v1.1.0
ClearKnowledgeRefs removes knowledge catalog binds for one microservice UUID.
func (*DB) ClearLocalRuntimeClasses ¶
ClearLocalRuntimeClasses removes all RuntimeClass rows.
func (*DB) ClearLocalWorkloadRuntimeFields ¶
ClearLocalWorkloadRuntimeFields clears runtime tracking on local workload rows.
func (*DB) ClearLocalWorkloads ¶
ClearLocalWorkloads removes all local workload records.
func (*DB) ClearRuntimeContainerRefs ¶
ClearRuntimeContainerRefs removes runtime container ref rows. When scope is non-empty, only rows matching that scope are deleted.
func (*DB) ClearServiceAccountTokens ¶
ClearServiceAccountTokens removes all token metadata rows.
func (*DB) Close ¶
Close checkpoints the WAL (TRUNCATE) then closes the connection. Production path: internal/supervisor.(*Supervisor).Stop() calls store.GetInstance().Close() last.
func (*DB) CountKnowledgeRefs ¶ added in v1.1.0
CountKnowledgeRefs returns how many catalog binds exist for one Knowledge name.
func (*DB) CountModelRefs ¶ added in v1.1.0
CountModelRefs returns how many explicit refs exist for one model name.
func (*DB) DeleteAgentPrivateKey ¶
DeleteAgentPrivateKey removes the provisioned private key payload.
func (*DB) DeleteControllerVolumeMount ¶
DeleteControllerVolumeMount removes a controller volume mount record by UUID.
func (*DB) DeleteEdgeGuardSignature ¶
DeleteEdgeGuardSignature removes the stored edgeguard signature JWT.
func (*DB) DeleteKnowledgeRefs ¶ added in v1.1.0
DeleteKnowledgeRefs removes catalog binds for one Knowledge name.
func (*DB) DeleteLocalKnowledge ¶ added in v1.1.0
DeleteLocalKnowledge deletes one local Knowledge by metadata.name.
func (*DB) DeleteLocalModel ¶ added in v1.1.0
DeleteLocalModel deletes one local model by metadata.name.
func (*DB) DeleteLocalRegistry ¶
DeleteLocalRegistry deletes a local registry by ID.
func (*DB) DeleteLocalRuntimeClass ¶
DeleteLocalRuntimeClass deletes one RuntimeClass by name.
func (*DB) DeleteLocalWorkload ¶
DeleteLocalWorkload removes a local workload record by id.
func (*DB) DeleteModelRefs ¶ added in v1.1.0
DeleteModelRefs removes explicit references for one model name.
func (*DB) DeletePersistentVolume ¶ added in v1.1.0
DeletePersistentVolume removes one consumer row after the directory is destroyed.
func (*DB) DeleteRuntimeContainerRef ¶
DeleteRuntimeContainerRef removes the runtime container ref for msUUID at scope.
func (*DB) DeleteSharedPersistentVolumes ¶ added in v1.1.0
DeleteSharedPersistentVolumes removes every consumer row for a shared name.
func (*DB) DeleteSystemControlPlane ¶
DeleteSystemControlPlane removes the singleton system control plane row.
func (*DB) DeleteWorkloadModelRefs ¶ added in v1.1.0
DeleteWorkloadModelRefs removes catalog binds for one microservice UUID.
func (*DB) DiskDirectory ¶ added in v1.1.0
DiskDirectory is the directory that contains edgelet.db. Persistent VOLUME trees live beside the database under volumes/data and volumes/shared.
func (*DB) EnsureDefaultControllerRegistries ¶
EnsureDefaultControllerRegistries ensures docker.io and from_cache defaults exist. Hugging Face Hub is a local-only built-in and is not seeded here.
func (*DB) EnsureDefaultLocalRegistries ¶
EnsureDefaultLocalRegistries ensures built-in public registries exist (docker.io, from_cache, and Hugging Face Hub).
func (*DB) FindLocalWorkloadsByAppAndName ¶
func (d *DB) FindLocalWorkloadsByAppAndName(application, name string) ([]*models.LocalDeployedMicroservice, error)
FindLocalWorkloadsByAppAndName finds local workloads by app/name.
func (*DB) GetAgentPrivateKey ¶
GetAgentPrivateKey reads the provisioned private key payload (base64 JWK). Returns found=false when there is no stored key.
func (*DB) GetControllerKnowledgeByName ¶ added in v1.1.0
func (d *DB) GetControllerKnowledgeByName(name string) (*models.ControllerKnowledge, error)
GetControllerKnowledgeByName returns the fleet-desired Knowledge row for a unique name.
func (*DB) GetControllerKnowledgeByUUID ¶ added in v1.1.0
func (d *DB) GetControllerKnowledgeByUUID(uuid string) (*models.ControllerKnowledge, error)
GetControllerKnowledgeByUUID returns one fleet-desired Knowledge row by uuid.
func (*DB) GetControllerModelByName ¶ added in v1.1.0
func (d *DB) GetControllerModelByName(name string) (*models.ControllerModel, error)
GetControllerModelByName returns the fleet-desired model row for a unique name.
func (*DB) GetControllerRegistry ¶ added in v1.1.0
GetControllerRegistry gets one controller registry by ID.
func (*DB) GetControllerRuntimeClass ¶ added in v1.1.0
func (d *DB) GetControllerRuntimeClass(name string) (*models.ControllerRuntimeClass, error)
GetControllerRuntimeClass returns the fleet-desired RuntimeClass row for a name.
func (*DB) GetControllerVolumeMountByUUID ¶
func (d *DB) GetControllerVolumeMountByUUID(uuid string) (*VolumeMountRecord, error)
GetControllerVolumeMountByUUID retrieves a single controller volume mount record by UUID.
func (*DB) GetEdgeGuardSignature ¶
GetEdgeGuardSignature reads the current edgeguard hardware signature JWT. Returns found=false when there is no stored signature.
func (*DB) GetLocalKnowledge ¶ added in v1.1.0
func (d *DB) GetLocalKnowledge(name string) (*models.LocalKnowledge, error)
GetLocalKnowledge retrieves one local Knowledge by metadata.name.
func (*DB) GetLocalModel ¶ added in v1.1.0
func (d *DB) GetLocalModel(name string) (*models.LocalModel, error)
GetLocalModel retrieves one local model by metadata.name.
func (*DB) GetLocalRegistry ¶
GetLocalRegistry gets one local registry by ID.
func (*DB) GetLocalRuntimeClass ¶
func (d *DB) GetLocalRuntimeClass(name string) (*models.LocalRuntimeClass, error)
GetLocalRuntimeClass returns one RuntimeClass by name.
func (*DB) GetLocalWorkload ¶
func (d *DB) GetLocalWorkload(id string) (*models.LocalDeployedMicroservice, error)
GetLocalWorkload retrieves one local workload record by id.
func (*DB) GetPersistentVolume ¶ added in v1.1.0
func (d *DB) GetPersistentVolume(uuid, name string) (*PersistentVolumeRecord, error)
GetPersistentVolume returns one consumer row.
func (*DB) GetRuntimeContainerRef ¶
func (d *DB) GetRuntimeContainerRef(msUUID, scope string) (*ContainerState, error)
GetRuntimeContainerRef returns the runtime container ref for msUUID at scope. Returns nil if not found or DB not opened.
func (*DB) GetSystemControlPlane ¶
func (d *DB) GetSystemControlPlane() (*models.ControlPlaneDeployment, bool, error)
GetSystemControlPlane reads the singleton system control plane row. Returns found=false when no deployment is stored.
func (*DB) InsertKnowledgeRefs ¶ added in v1.1.0
InsertKnowledgeRefs records knowledge catalog binds for one microservice UUID.
func (*DB) IsManagedFleetRuntimeClass ¶ added in v1.1.0
IsManagedFleetRuntimeClass reports whether name is a controller-desired RuntimeClass while the node is provisioned. Unprovisioned nodes never treat a name as fleet-managed.
func (*DB) ListActiveServiceAccountTokens ¶
func (d *DB) ListActiveServiceAccountTokens() ([]*models.ServiceAccountToken, error)
ListActiveServiceAccountTokens lists non-revoked token metadata.
func (*DB) ListKnowledgeRefs ¶ added in v1.1.0
ListKnowledgeRefs returns knowledge names bound to one microservice UUID.
func (*DB) ListLocalKnowledge ¶ added in v1.1.0
func (d *DB) ListLocalKnowledge() ([]*models.LocalKnowledge, error)
ListLocalKnowledge returns all local Knowledge rows ordered by name.
func (*DB) ListLocalModels ¶ added in v1.1.0
func (d *DB) ListLocalModels() ([]*models.LocalModel, error)
ListLocalModels returns all local model rows ordered by name.
func (*DB) ListLocalRuntimeClasses ¶
func (d *DB) ListLocalRuntimeClasses() ([]*models.LocalRuntimeClass, error)
ListLocalRuntimeClasses returns all applied RuntimeClass rows ordered by name.
func (*DB) ListLocalWorkloads ¶
func (d *DB) ListLocalWorkloads() ([]*models.LocalDeployedMicroservice, error)
ListLocalWorkloads returns all local workload records.
func (*DB) ListPersistentVolumeCleanupUUIDs ¶ added in v1.1.0
ListPersistentVolumeCleanupUUIDs returns UUIDs whose reserved cleanup bit may shorten the orphan-prune grace window.
func (*DB) ListPersistentVolumes ¶ added in v1.1.0
func (d *DB) ListPersistentVolumes() ([]PersistentVolumeRecord, error)
ListPersistentVolumes returns every consumer row.
func (*DB) ListPersistentVolumesForUUID ¶ added in v1.1.0
func (d *DB) ListPersistentVolumesForUUID(uuid string) ([]PersistentVolumeRecord, error)
ListPersistentVolumesForUUID returns every consumer row for one microservice.
func (*DB) ListPruneKeepKnowledgeNames ¶ added in v1.1.0
ListPruneKeepKnowledgeNames returns names dangling prune must keep: fleet-desired controller Knowledge names plus catalog binds when includeWorkloadRefs is true.
func (*DB) ListPruneKeepModelNames ¶ added in v1.1.0
ListPruneKeepModelNames returns names prune must keep on disk and as rows. Fleet-desired controller model names are always kept. Workload binds are included only when includeWorkloadRefs is true (watchdog excludes them).
func (*DB) ListReferencedModelNames ¶ added in v1.1.0
ListReferencedModelNames returns names that must be kept during dangling prune: fleet-desired controller model names plus any explicit model_refs rows. Unbound local model rows are not kept just because they exist.
func (*DB) ListServiceAccountTokens ¶
func (d *DB) ListServiceAccountTokens() ([]*models.ServiceAccountToken, error)
ListServiceAccountTokens lists token metadata.
func (*DB) ListSharedPersistentVolumeConsumers ¶ added in v1.1.0
func (d *DB) ListSharedPersistentVolumeConsumers(name string) ([]PersistentVolumeRecord, error)
ListSharedPersistentVolumeConsumers returns every consumer of a shared name.
func (*DB) ListUnreferencedWorkloadVolumes ¶ added in v1.1.0
func (d *DB) ListUnreferencedWorkloadVolumes() ([]UnreferencedPersistentVolume, error)
ListUnreferencedWorkloadVolumes returns private orphans and shared names whose last consumer is unreferenced. Control-plane kind is omitted.
func (*DB) LoadAllControllerVolumeMounts ¶
func (d *DB) LoadAllControllerVolumeMounts() ([]VolumeMountRecord, error)
LoadAllControllerVolumeMounts retrieves all controller volume mount records.
func (*DB) LoadControllerKnowledge ¶ added in v1.1.0
func (d *DB) LoadControllerKnowledge() ([]*models.ControllerKnowledge, error)
LoadControllerKnowledge retrieves all controller Knowledge rows ordered by name.
func (*DB) LoadControllerMicroservices ¶
func (d *DB) LoadControllerMicroservices() ([]*models.Microservice, error)
LoadControllerMicroservices retrieves all controller microservices ordered by uuid.
func (*DB) LoadControllerModels ¶ added in v1.1.0
func (d *DB) LoadControllerModels() ([]*models.ControllerModel, error)
LoadControllerModels retrieves all controller model rows ordered by name.
func (*DB) LoadControllerRegistries ¶
LoadControllerRegistries retrieves all controller registries ordered by id.
func (*DB) LoadControllerRuntimeClasses ¶ added in v1.1.0
func (d *DB) LoadControllerRuntimeClasses() ([]*models.ControllerRuntimeClass, error)
LoadControllerRuntimeClasses retrieves all fleet RuntimeClass rows ordered by name.
func (*DB) LoadLocalRegistries ¶
LoadLocalRegistries retrieves all local registries ordered by id.
func (*DB) LookupRegistry ¶ added in v1.1.0
LookupRegistry returns a local registry row, falling back to a controller registry.
func (*DB) MarkPersistentVolumesUnreferenced ¶ added in v1.1.0
MarkPersistentVolumesUnreferenced stamps consumer rows when a UUID leaves desired state. Files are not deleted.
func (*DB) NextLocalRegistryID ¶ added in v1.1.0
NextLocalRegistryID allocates the next local registry id after built-in rows.
func (*DB) Open ¶
Open opens (or creates) the SQLite database at the given directory and runs migrations
func (*DB) PersistentVolumeKeepSet ¶ added in v1.1.0
func (d *DB) PersistentVolumeKeepSet(listedPrivateUUIDs, listedSharedNames []string) (PersistentVolumeKeepSet, error)
PersistentVolumeKeepSet builds the destroy keep-set from desired state, still-referenced ledger rows, and listed containers.
func (*DB) PrivateVolumeUUIDKept ¶ added in v1.1.0
PrivateVolumeUUIDKept reports whether a private UUID is in the keep-set.
func (*DB) ReplaceAllControllerVolumeMounts ¶
func (d *DB) ReplaceAllControllerVolumeMounts(records []VolumeMountRecord) error
ReplaceAllControllerVolumeMounts atomically replaces all controller volume mount rows. Used by the volume mount manager's full-save on every write.
func (*DB) ReplaceKnowledgeRefs ¶ added in v1.1.0
ReplaceKnowledgeRefs replaces knowledge catalog binds for one microservice UUID.
func (*DB) ReplaceWorkloadModelRefs ¶ added in v1.1.0
ReplaceWorkloadModelRefs replaces catalog binds for one microservice UUID.
func (*DB) RevokeAllServiceAccountTokens ¶
RevokeAllServiceAccountTokens marks all tokens revoked.
func (*DB) RevokeServiceAccountToken ¶
RevokeServiceAccountToken revokes a token by JTI.
func (*DB) SaveControllerKnowledge ¶ added in v1.1.0
func (d *DB) SaveControllerKnowledge(items []*models.ControllerKnowledge) error
SaveControllerKnowledge replaces all controller Knowledge rows in a single transaction. Identity is uuid (primary key) plus unique name.
func (*DB) SaveControllerMicroservices ¶
func (d *DB) SaveControllerMicroservices(microservices []*models.Microservice) error
SaveControllerMicroservices replaces all controller microservice rows in a single transaction.
func (*DB) SaveControllerModels ¶ added in v1.1.0
func (d *DB) SaveControllerModels(items []*models.ControllerModel) error
SaveControllerModels replaces all controller model rows in a single transaction. Identity is uuid (primary key) plus unique name.
func (*DB) SaveControllerRegistries ¶
SaveControllerRegistries replaces all controller registry rows in a single transaction.
func (*DB) SaveControllerRuntimeClasses ¶ added in v1.1.0
func (d *DB) SaveControllerRuntimeClasses(items []*models.ControllerRuntimeClass) error
SaveControllerRuntimeClasses replaces all fleet RuntimeClass rows in a single transaction. Empty list clears the table. Identity is unique name.
func (*DB) SeedPersistentVolumesFromDisk ¶ added in v1.1.0
SeedPersistentVolumesFromDisk records existing private data directories. It does not walk volumes/shared or delete files.
func (*DB) SharedVolumeNameKept ¶ added in v1.1.0
SharedVolumeNameKept reports whether a shared name is in the keep-set.
func (*DB) UpsertAgentPrivateKey ¶
UpsertAgentPrivateKey stores the provisioned private key payload (base64 JWK).
func (*DB) UpsertControllerKnowledge ¶ added in v1.1.0
func (d *DB) UpsertControllerKnowledge(item *models.ControllerKnowledge) error
UpsertControllerKnowledge inserts or updates one controller Knowledge row by uuid. Name must stay unique across controller Knowledge rows.
func (*DB) UpsertControllerRegistry ¶
UpsertControllerRegistry inserts or updates one controller registry row.
func (*DB) UpsertControllerVolumeMount ¶
func (d *DB) UpsertControllerVolumeMount(rec VolumeMountRecord) error
UpsertControllerVolumeMount inserts or replaces a controller volume mount record.
func (*DB) UpsertEdgeGuardSignature ¶
UpsertEdgeGuardSignature stores the current edgeguard hardware signature JWT.
func (*DB) UpsertLocalKnowledge ¶ added in v1.1.0
func (d *DB) UpsertLocalKnowledge(k *models.LocalKnowledge) error
UpsertLocalKnowledge inserts or updates one local Knowledge row by metadata.name.
func (*DB) UpsertLocalModel ¶ added in v1.1.0
func (d *DB) UpsertLocalModel(m *models.LocalModel) error
UpsertLocalModel inserts or updates one local model row by metadata.name.
func (*DB) UpsertLocalRegistry ¶
UpsertLocalRegistry inserts or updates one local registry row.
func (*DB) UpsertLocalRuntimeClass ¶
func (d *DB) UpsertLocalRuntimeClass(rc *models.LocalRuntimeClass) error
UpsertLocalRuntimeClass inserts or updates one RuntimeClass row.
func (*DB) UpsertLocalWorkload ¶
func (d *DB) UpsertLocalWorkload(ms *models.LocalDeployedMicroservice) error
UpsertLocalWorkload upserts a local workload record.
func (*DB) UpsertPersistentVolume ¶ added in v1.1.0
UpsertPersistentVolume inserts or refreshes a consumer row while the UUID is in desired state. Shared rows from different UUIDs coexist for the same name.
func (*DB) UpsertPersistentVolumesFromMappings ¶ added in v1.1.0
func (d *DB) UpsertPersistentVolumesFromMappings(uuid, kind string, mappings []*models.VolumeMapping) error
UpsertPersistentVolumesFromMappings records VOLUME mappings only. BIND and VOLUME_MOUNT never create a shared claim.
func (*DB) UpsertRuntimeContainerRef ¶
UpsertRuntimeContainerRef upserts a runtime container ref row.
func (*DB) UpsertServiceAccountToken ¶
func (d *DB) UpsertServiceAccountToken(token *models.ServiceAccountToken) error
UpsertServiceAccountToken upserts token metadata.
func (*DB) UpsertSystemControlPlane ¶
func (d *DB) UpsertSystemControlPlane(dep *models.ControlPlaneDeployment) error
UpsertSystemControlPlane stores the singleton system control plane row.
type PersistentVolumeKeepSet ¶ added in v1.1.0
type PersistentVolumeKeepSet struct {
PrivateUUIDs []string
}
PersistentVolumeKeepSet is the set of private UUIDs and shared names that must not be destroyed. Listed containers are unioned with desired-state and still-referenced ledger rows.
type PersistentVolumeRecord ¶ added in v1.1.0
type PersistentVolumeRecord struct {
UUID string
VolumeName string
Scope string
Kind string
HostPath string
CreatedAt int64
LastDesiredAt int64
UnreferencedAt *int64
}
PersistentVolumeRecord is one consumer row in the persistent volume ledger.
type UnreferencedPersistentVolume ¶ added in v1.1.0
type UnreferencedPersistentVolume struct {
UUID string
VolumeName string
Scope string
Kind string
HostPath string
UnreferencedAt int64
LastConsumerUUID string
}
UnreferencedPersistentVolume is a workload claim whose last consumer has left desired state. Shared names appear once when every consumer is unreferenced.
type VolumeMountRecord ¶
type VolumeMountRecord struct {
UUID string
Name string
Version float64
Kind string // "SECRET" or "CONFIGMAP"
Checksum string
Microservices []string // stored as JSON TEXT array
Data map[string]any // stored as JSON TEXT (key->base64 pairs)
UpdatedAt int64
}
VolumeMountRecord represents a single volume mount index entry. UUID, Name, Version, Kind, Checksum are real typed columns. Microservices and Data are JSON-serialized TEXT columns.
Source Files
¶
- control_plane_deployments.go
- controller_knowledge.go
- controller_models.go
- controller_runtime_classes.go
- db.go
- edgeguard_credentials.go
- knowledge_refs.go
- local_deployed_microservices.go
- local_knowledge.go
- local_models.go
- local_registries.go
- local_runtime_classes.go
- microservices.go
- model_refs.go
- persistent_volumes.go
- registries.go
- runtime_cleanup.go
- runtime_container_refs.go
- schema.go
- service_account_tokens.go
- volumes.go