Documentation
¶
Index ¶
- Constants
- Variables
- func CanonicalVolumeScope(raw string) string
- func CanonicalizeVerbs(verbs []string) []string
- func CatalogItemNames(c *ModelCatalog) []string
- func CatalogMountNeedsRecreate(prev, next *ModelCatalog) bool
- func CloneStringSlicePtr(in *[]string) *[]string
- func HasTmpfsAt(tmpfs []TmpfsMount, containerPath string) bool
- func HighestBuiltInLocalRegistryID() int
- func IsBuiltInLocalRegistryID(id int) bool
- func IsReservedRuntimeClassName(name string) bool
- func KnowledgeCatalogItemNames(c *KnowledgeCatalog) []string
- func KnowledgeCatalogMountNeedsRecreate(prev, next *KnowledgeCatalog) bool
- func LocalDeployNeedsRecreate(prev, next *Microservice) bool
- func MaskedControlPlaneManifestYAML(manifest string) (string, error)
- func NeedsReadOnlyRootTmpfsWarning(readOnly bool, tmpfs []TmpfsMount) bool
- func NormalizeRegistryType(registryType string) string
- func NormalizeSupplementalGroups(raw any) ([]int64, error)
- func PodIDForEngine(engineName, containerID, sandboxID string) string
- func RegistryIdentityCollision(existing, incoming *Registry) error
- func RequireOCIForImagePull(reg *Registry) error
- func RequireRegistryType(reg *Registry, want string) error
- func RuntimeClassBinaryPathForHandler(handler string) string
- func RuntimeClassBlockingUUIDs(item *LocalRuntimeClass, locals []*LocalDeployedMicroservice, ...) []string
- func RuntimeFromManifestYAML(manifest string) string
- func StatControlPlaneTLSDir(hostDir string) (os.FileInfo, error)
- func StatControlPlaneTLSFile(hostDir, basename string) (os.FileInfo, error)
- func UsesImageDefault(argv *[]string) bool
- func ValidKnowledgeFormat(format string) bool
- func ValidKnowledgeSource(source string) bool
- func ValidKnowledgeState(state string) bool
- func ValidModelFormat(format string) bool
- func ValidModelSource(source string) bool
- func ValidModelState(state string) bool
- func ValidRegistryType(registryType string) bool
- func ValidRuntimeClassSource(source string) bool
- func ValidateCatalogApply(c *ModelCatalog, requiredSource string, lookup ModelStatusLookup) error
- func ValidateCatalogModelSources(c *ModelCatalog, requiredSource string, lookup ModelSourceLookup) error
- func ValidateControlPlaneTLSPath(path string) (string, error)
- func ValidateEnvVar(e *EnvVar) error
- func ValidateExecMessage(em *ExecMessage) error
- func ValidateFieldAgentStatus(fa *FieldAgentStatus) error
- func ValidateKnowledgeCatalog(c *KnowledgeCatalog, volumeDests, tmpfsPaths, modelPaths []string) error
- func ValidateKnowledgeCatalogApply(c *KnowledgeCatalog, requiredSource string, lookup KnowledgeStatusLookup) error
- func ValidateLogMessage(lm *LogMessage) error
- func ValidateMicroserviceStatus(ms *MicroserviceStatus) error
- func ValidateModelCatalog(c *ModelCatalog, volumeDests, tmpfsPaths []string) error
- func ValidatePortMapping(p *PortMapping) error
- func ValidateRegistry(r *Registry) error
- func ValidateRoute(r *Route) error
- func ValidateStatusReporterStatus(sr *StatusReporterStatus) error
- func ValidateVolumeMapping(v *VolumeMapping) error
- func ValidateWorkloadCatalogs(models *ModelCatalog, knowledge *KnowledgeCatalog, ...) error
- func ValidateYamlConfig(yc *YamlConfig) error
- func VolumeScopeKnown(raw string) bool
- type CatalogGateDecision
- func CombineCatalogStartGates(modelDec CatalogGateDecision, modelMsg string, ...) (CatalogGateDecision, string)
- func EvaluateCatalogStartGate(c *ModelCatalog, requiredSource string, lookup ModelStatusLookup) (CatalogGateDecision, string, error)
- func EvaluateKnowledgeCatalogStartGate(c *KnowledgeCatalog, requiredSource string, lookup KnowledgeStatusLookup) (CatalogGateDecision, string, error)
- type ControlPlaneAuthBootstrap
- type ControlPlaneAuthClient
- type ControlPlaneAuthOIDCTTL
- type ControlPlaneAuthRateLimit
- type ControlPlaneAuthSessionStore
- type ControlPlaneAuthSpec
- type ControlPlaneAuthTokenTTL
- type ControlPlaneConsoleSpec
- type ControlPlaneDeployment
- type ControlPlaneManifest
- type ControlPlaneManifestSpec
- type ControlPlaneTLSBase64
- type ControlPlaneTLSConfig
- type ControlPlaneVaultSpec
- type ControllerKnowledge
- type ControllerModel
- type ControllerRuntimeClass
- type ControllerStatus
- type DeviceMapping
- type EdgeletAPIStatus
- type EnvVar
- type ErrKnowledgeFailed
- type ErrKnowledgeSourceScope
- type ErrModelFailed
- type ErrModelSourceScope
- type ExecMessage
- type FieldAgentStatus
- type Healthcheck
- type KnowledgeCatalog
- type KnowledgeCatalogItem
- type KnowledgeStatusInfo
- type KnowledgeStatusLookup
- type LocalDeployManifest
- func (m *LocalDeployManifest) ManifestImage() string
- func (m *LocalDeployManifest) Validate() error
- func (m *LocalDeployManifest) ValidateCatalogApply(lookup ModelStatusLookup) error
- func (m *LocalDeployManifest) ValidateKnowledgeCatalogApply(lookup KnowledgeStatusLookup) error
- func (m *LocalDeployManifest) ValidateWithModelSources(lookup ModelSourceLookup) error
- type LocalDeployedMicroservice
- type LocalKnowledge
- type LocalKnowledgeManifest
- type LocalKnowledgeSpec
- type LocalModel
- type LocalModelManifest
- type LocalModelSpec
- type LocalRegistryManifest
- type LocalRegistrySpec
- type LocalRuntimeClass
- type LocalRuntimeClassManifest
- type LogMessage
- type Microservice
- func (m *Microservice) Equals(other *Microservice) bool
- func (m *Microservice) GetIsUpdating() bool
- func (m *Microservice) GetMemoryLimitMB() *int64
- func (m *Microservice) GetMemoryReservationMB() *int64
- func (m *Microservice) GetMemorySwapMB() *int64
- func (m *Microservice) GetShmSizeMB() *int64
- func (m *Microservice) MarshalKnowledgeJSON() (string, error)
- func (m *Microservice) MarshalModelsJSON() (string, error)
- func (m *Microservice) SetIsUpdating(updating bool)
- func (m *Microservice) SetMemoryLimitMB(memoryLimitMB *int64)
- func (m *Microservice) SetMemoryReservationMB(mb *int64)
- func (m *Microservice) SetMemorySwapMB(mb *int64)
- func (m *Microservice) SetShmSizeMB(mb *int64)
- func (m *Microservice) UnmarshalKnowledgeJSON(raw string) error
- func (m *Microservice) UnmarshalModelsJSON(raw string) error
- func (m *Microservice) Validate() error
- func (m *Microservice) ValidateCatalogApply(requiredSource string, lookup ModelStatusLookup) error
- func (m *Microservice) ValidateKnowledgeCatalogApply(requiredSource string, lookup KnowledgeStatusLookup) error
- func (m *Microservice) ValidateWithModelSources(requiredSource string, lookup ModelSourceLookup) error
- type MicroserviceState
- type MicroserviceStatus
- func (m *MicroserviceStatus) AddExecSessionID(execSessionID string)
- func (m *MicroserviceStatus) ApplyPodID(engineName, sandboxID string)
- func (m *MicroserviceStatus) Equals(other *MicroserviceStatus) bool
- func (m *MicroserviceStatus) GetExecSessionIDs() []string
- func (m *MicroserviceStatus) GetOperatingDuration() int64
- func (m *MicroserviceStatus) RemoveExecSessionID(execSessionID string)
- type ModelCatalog
- type ModelCatalogItem
- type ModelSourceLookup
- type ModelStatusInfo
- type ModelStatusLookup
- type ModuleStatus
- type PortMapping
- type ProcessManagerStatus
- func (p *ProcessManagerStatus) ClearImagePullStatus(microserviceUUID string) *ProcessManagerStatus
- func (p *ProcessManagerStatus) ClearMicroserviceStatuses()
- func (p *ProcessManagerStatus) GetJSONMicroservicesStatus() string
- func (p *ProcessManagerStatus) GetJSONRegistriesStatus() string
- func (p *ProcessManagerStatus) GetMicroserviceStatus(microserviceUUID string) *MicroserviceStatus
- func (p *ProcessManagerStatus) GetRegistriesStatus() map[int]string
- func (p *ProcessManagerStatus) IncrementMicroservicesRestartCount(microserviceUUID string) *ProcessManagerStatus
- func (p *ProcessManagerStatus) LookupMicroserviceStatus(microserviceUUID string) *MicroserviceStatus
- func (p *ProcessManagerStatus) PruneMicroserviceStatus(predicate func(uuid string, status *MicroserviceStatus) bool)
- func (p *ProcessManagerStatus) RemoveNotRunningMicroserviceStatus()
- func (p *ProcessManagerStatus) ResetMicroservicesRestartCount(microserviceUUID string) *ProcessManagerStatus
- func (p *ProcessManagerStatus) ResolveImagePull(microserviceUUID string, pullTracked bool) *ProcessManagerStatus
- func (p *ProcessManagerStatus) SetImagePullMiss(microserviceUUID string, state MicroserviceState, message string) *ProcessManagerStatus
- func (p *ProcessManagerStatus) SetMicroserviceStatusWait(microserviceUUID, message string) *ProcessManagerStatus
- func (p *ProcessManagerStatus) SetMicroservicesHealthStatus(microserviceUUID string, healthStatus *string) *ProcessManagerStatus
- func (p *ProcessManagerStatus) SetMicroservicesState(microserviceUUID string, state MicroserviceState) *ProcessManagerStatus
- func (p *ProcessManagerStatus) SetMicroservicesStatePercentage(microserviceUUID string, percentage float32) *ProcessManagerStatus
- func (p *ProcessManagerStatus) SetMicroservicesStatus(microserviceUUID string, status *MicroserviceStatus) *ProcessManagerStatus
- func (p *ProcessManagerStatus) SetMicroservicesStatusErrorMessage(microserviceUUID string, message string) *ProcessManagerStatus
- func (p *ProcessManagerStatus) SetRegistriesStatus(registryID int, status string) *ProcessManagerStatus
- func (p *ProcessManagerStatus) SetRunningMicroservicesCount(count int) *ProcessManagerStatus
- type ProfileConfig
- type RBACEnvelopeV1
- type RBACRuleV1
- type Registry
- type RegistryBuilder
- func (b *RegistryBuilder) Build() *Registry
- func (b *RegistryBuilder) SetCAB64(caB64 string) *RegistryBuilder
- func (b *RegistryBuilder) SetID(id int) *RegistryBuilder
- func (b *RegistryBuilder) SetInsecure(insecure bool) *RegistryBuilder
- func (b *RegistryBuilder) SetIsPublic(isPublic bool) *RegistryBuilder
- func (b *RegistryBuilder) SetPassword(password string) *RegistryBuilder
- func (b *RegistryBuilder) SetType(registryType string) *RegistryBuilder
- func (b *RegistryBuilder) SetURL(url string) *RegistryBuilder
- func (b *RegistryBuilder) SetUserEmail(userEmail string) *RegistryBuilder
- func (b *RegistryBuilder) SetUserName(userName string) *RegistryBuilder
- type ResourceConsumptionManagerStatus
- func (r *ResourceConsumptionManagerStatus) SetAvailableDisk(availableDisk int64) *ResourceConsumptionManagerStatus
- func (r *ResourceConsumptionManagerStatus) SetAvailableMemory(availableMemory int64) *ResourceConsumptionManagerStatus
- func (r *ResourceConsumptionManagerStatus) SetCPUUsage(cpuUsage float64) *ResourceConsumptionManagerStatus
- func (r *ResourceConsumptionManagerStatus) SetCPUViolation(violation bool) *ResourceConsumptionManagerStatus
- func (r *ResourceConsumptionManagerStatus) SetDiskUsage(diskUsage float64) *ResourceConsumptionManagerStatus
- func (r *ResourceConsumptionManagerStatus) SetDiskViolation(violation bool) *ResourceConsumptionManagerStatus
- func (r *ResourceConsumptionManagerStatus) SetMemoryUsage(memoryUsage float64) *ResourceConsumptionManagerStatus
- func (r *ResourceConsumptionManagerStatus) SetMemoryViolation(violation bool) *ResourceConsumptionManagerStatus
- func (r *ResourceConsumptionManagerStatus) SetTotalCPU(totalCPU float64) *ResourceConsumptionManagerStatus
- func (r *ResourceConsumptionManagerStatus) SetTotalDiskSpace(totalDiskSpace int64) *ResourceConsumptionManagerStatus
- type Route
- type RuntimeClassStatus
- type SSHProxyManagerStatus
- func (s *SSHProxyManagerStatus) GetJSONProxyStatus() string
- func (s *SSHProxyManagerStatus) SetConnectionStatus(status string) *SSHProxyManagerStatus
- func (s *SSHProxyManagerStatus) SetErrorMessage(errMsg string) *SSHProxyManagerStatus
- func (s *SSHProxyManagerStatus) SetProxyConfig(username, host string, remotePort, localPort int) *SSHProxyManagerStatus
- func (s *SSHProxyManagerStatus) SetProxyStatus(status map[string]any) *SSHProxyManagerStatus
- type ServiceAccount
- type ServiceAccountRoleRef
- type ServiceAccountRule
- type ServiceAccountToken
- type StatusReporterStatus
- type SupervisorStatus
- func (s *SupervisorStatus) GetModuleStatus(moduleIndex int) ModuleStatus
- func (s *SupervisorStatus) GetOperationDuration() int64
- func (s *SupervisorStatus) SetDaemonLastStart(timestamp int64) *SupervisorStatus
- func (s *SupervisorStatus) SetDaemonStatus(status ModuleStatus) *SupervisorStatus
- func (s *SupervisorStatus) SetModuleStatus(moduleIndex int, status ModuleStatus) *SupervisorStatus
- func (s *SupervisorStatus) SetOperationDuration(duration int64) *SupervisorStatus
- func (s *SupervisorStatus) SetWarningMessage(message string) *SupervisorStatus
- type TmpfsMount
- type Ulimit
- type ValidationError
- type VolumeMapping
- type VolumeMappingType
- type VolumeMountManagerStatus
- type YamlConfig
Constants ¶
const ( // ControlPlaneTLS*Filename are container-relative names under /etc/iofog/controller-cert/. ControlPlaneTLSCertFilename = "tls.crt" ControlPlaneTLSKeyFilename = "tls.key" ControlPlaneTLSCAFilename = "ca.crt" )
const ( ExecMessageTypeStdin byte = 0 ExecMessageTypeStdout byte = 1 ExecMessageTypeStderr byte = 2 ExecMessageTypeControl byte = 3 )
ExecMessageType represents the type of exec message
const ( KnowledgeSourceLocal = "local" KnowledgeSourceManaged = "managed" )
Knowledge provenance on the node.
const ( KnowledgeCatalogPermRO = "ro" KnowledgeCatalogPermRW = "rw" )
Knowledge catalog mount mode. Default is read-only.
const ( KnowledgeStatePending = "Pending" KnowledgeStatePulling = "Pulling" KnowledgeStateReady = "Ready" KnowledgeStateFailed = "Failed" )
Knowledge lifecycle states.
const ( KnowledgeFormatMarkdown = "markdown" KnowledgeFormatPDF = "pdf" KnowledgeFormatJSONL = "jsonl" KnowledgeFormatParquet = "parquet" KnowledgeFormatArrow = "arrow" KnowledgeFormatSQLite = "sqlite" KnowledgeFormatFaiss = "faiss" KnowledgeFormatChroma = "chroma" KnowledgeFormatLance = "lance" KnowledgeFormatUnknown = "unknown" )
Optional spec.format hints for Knowledge artifacts.
const ( ModelStatePending = "Pending" ModelStatePulling = "Pulling" ModelStateReady = "Ready" ModelStateFailed = "Failed" )
Model lifecycle states.
const ( ModelFormatGGUF = "gguf" ModelFormatSafetensors = "safetensors" ModelFormatONNX = "onnx" ModelFormatPyTorch = "pytorch" ModelFormatTensorRT = "tensorrt" ModelFormatUnknown = "unknown" )
Optional spec.format hints.
const ( RuntimeClassSourceLocal = "local" RuntimeClassSourceManaged = "managed" )
RuntimeClass provenance on the node.
const ( LogMessageTypeLogLine byte = 6 LogMessageTypeLogStart byte = 7 LogMessageTypeLogStop byte = 8 LogMessageTypeLogError byte = 9 )
LogMessageType represents the type of log message
const ( ModelSourceLocal = "local" ModelSourceManaged = "managed" )
Model provenance on the node.
const ( ModelCatalogPermRO = "ro" ModelCatalogPermRW = "rw" )
Catalog mount mode. Default is read-only.
const ( RegistryTypeOCI = "oci" RegistryTypeHF = "hf" )
Registry types. Default is oci when omitted.
const ( BuiltInRegistryDockerIO = 1 BuiltInRegistryFromCache = 2 BuiltInRegistryHuggingFace = 3 DefaultHuggingFaceHubURL = "https://huggingface.co" )
Built-in local registry row ids. These rows are seeded on startup and cannot be edited or removed.
const ( // VolumeScopePrivate is the default persistent VOLUME identity (per microservice UUID). VolumeScopePrivate = "private" VolumeScopeShared = "shared" )
const CatalogWaitingMessage = "workload is waiting for model download"
CatalogWaitingMessage is the status text when a workload is waiting for model download.
const ControlPlaneDefaultNamespace = "default"
const ImagePullStatusFailed = "failed"
ImagePullStatusFailed reports that the desired image is not on this machine. Every other outcome omits the field.
const KnowledgeCatalogWaitingMessage = "workload is waiting for knowledge download"
KnowledgeCatalogWaitingMessage is the status text when a workload is waiting for Knowledge download and no named item is available yet.
const ReadOnlyRootWithoutTmpfsWarning = "read-only root filesystem is enabled and no tmpfs is mounted at /tmp"
ReadOnlyRootWithoutTmpfsWarning is logged when the root filesystem is read-only and the operator did not mount tmpfs at /tmp. Edgelet does not inject /tmp.
Variables ¶
var DeleteLock = &sync.Mutex{}
DeleteLock is a global lock for microservice deletion operations
Functions ¶
func CanonicalVolumeScope ¶ added in v1.1.0
CanonicalVolumeScope returns the stored volume scope. Only exact lowercase "shared" is shared; omit, empty, and any other value are private.
func CanonicalizeVerbs ¶
func CatalogItemNames ¶ added in v1.1.0
func CatalogItemNames(c *ModelCatalog) []string
CatalogItemNames returns trimmed item names in catalog order.
func CatalogMountNeedsRecreate ¶ added in v1.1.0
func CatalogMountNeedsRecreate(prev, next *ModelCatalog) bool
CatalogMountNeedsRecreate reports bindPath or catalog permissions drift. Item add/remove and model generation changes do not recreate the container.
func CloneStringSlicePtr ¶ added in v1.1.0
CloneStringSlicePtr copies an optional string list, preserving omitted vs empty.
func HasTmpfsAt ¶ added in v1.1.0
func HasTmpfsAt(tmpfs []TmpfsMount, containerPath string) bool
HasTmpfsAt reports whether tmpfs lists the given absolute container path.
func HighestBuiltInLocalRegistryID ¶ added in v1.1.0
func HighestBuiltInLocalRegistryID() int
HighestBuiltInLocalRegistryID is the largest reserved local registry id.
func IsBuiltInLocalRegistryID ¶ added in v1.1.0
IsBuiltInLocalRegistryID reports whether id is a seeded local default (docker.io, from_cache, or Hugging Face Hub).
func IsReservedRuntimeClassName ¶ added in v1.1.0
IsReservedRuntimeClassName reports whether name is reserved and cannot be applied or deleted as a RuntimeClass (for example the default crun handler).
func KnowledgeCatalogItemNames ¶ added in v1.1.0
func KnowledgeCatalogItemNames(c *KnowledgeCatalog) []string
KnowledgeCatalogItemNames returns trimmed item names in catalog order.
func KnowledgeCatalogMountNeedsRecreate ¶ added in v1.1.0
func KnowledgeCatalogMountNeedsRecreate(prev, next *KnowledgeCatalog) bool
KnowledgeCatalogMountNeedsRecreate reports bindPath or catalog permissions drift. Item add/remove and Knowledge generation changes do not recreate the container.
func LocalDeployNeedsRecreate ¶ added in v1.1.0
func LocalDeployNeedsRecreate(prev, next *Microservice) bool
LocalDeployNeedsRecreate reports whether a local re-apply must replace the running container. Catalog item add/remove does not recreate when bindPath and catalog permissions are unchanged.
func MaskedControlPlaneManifestYAML ¶
MaskedControlPlaneManifestYAML returns manifest YAML with secrets redacted.
func NeedsReadOnlyRootTmpfsWarning ¶ added in v1.1.0
func NeedsReadOnlyRootTmpfsWarning(readOnly bool, tmpfs []TmpfsMount) bool
NeedsReadOnlyRootTmpfsWarning is true when the root is read-only and /tmp is not a tmpfs.
func NormalizeRegistryType ¶ added in v1.1.0
NormalizeRegistryType returns oci when type is empty; otherwise lower-trimmed type.
func NormalizeSupplementalGroups ¶ added in v1.1.3
NormalizeSupplementalGroups returns host group IDs sorted ascending. An empty list returns nil. Group ID 0 is kept. Names, strings, negative IDs, non-integral numbers, duplicates, and more than 16 entries are rejected.
func PodIDForEngine ¶ added in v1.1.0
PodIDForEngine returns the status pod id for a running container. The edgelet engine uses the pause / sandbox id. Docker and podman reuse the app container id. Unknown values are omitted by callers (empty string).
func RegistryIdentityCollision ¶ added in v1.1.0
RegistryIdentityCollision returns an error when the same id already exists with a different (type, url) pair.
func RequireOCIForImagePull ¶ added in v1.1.0
RequireOCIForImagePull returns an error when a registry cannot be used to pull container images. A nil registry is allowed (unauthenticated default pull).
func RequireRegistryType ¶ added in v1.1.0
RequireRegistryType returns an error when the registry type does not match want.
func RuntimeClassBlockingUUIDs ¶ added in v1.1.0
func RuntimeClassBlockingUUIDs(item *LocalRuntimeClass, locals []*LocalDeployedMicroservice, controller []*Microservice) []string
RuntimeClassBlockingUUIDs returns microservice UUIDs that still reference the RuntimeClass. Local workloads only block while running. Controller microservices block whenever they select the class and are not marked delete.
func RuntimeFromManifestYAML ¶ added in v1.1.0
RuntimeFromManifestYAML returns spec.container.runtime from a local Microservice manifest, or empty when the document has no runtime.
func StatControlPlaneTLSDir ¶
StatControlPlaneTLSDir returns metadata for a validated host TLS directory.
func StatControlPlaneTLSFile ¶
StatControlPlaneTLSFile returns metadata for a known TLS file under a validated host directory.
func UsesImageDefault ¶ added in v1.1.0
UsesImageDefault reports whether an argv field should leave the image default (omitted or an explicit empty list).
func ValidKnowledgeFormat ¶ added in v1.1.0
ValidKnowledgeFormat reports whether format is empty or a known Knowledge hint.
func ValidKnowledgeSource ¶ added in v1.1.0
ValidKnowledgeSource reports whether source is local or managed.
func ValidKnowledgeState ¶ added in v1.1.0
ValidKnowledgeState reports whether state is a known Knowledge lifecycle value.
func ValidModelFormat ¶ added in v1.1.0
ValidModelFormat reports whether format is empty or a known hint.
func ValidModelSource ¶ added in v1.1.0
ValidModelSource reports whether source is local or managed.
func ValidModelState ¶ added in v1.1.0
ValidModelState reports whether state is a known Model lifecycle value.
func ValidRegistryType ¶ added in v1.1.0
ValidRegistryType reports whether type is oci or hf (empty is treated as oci).
func ValidRuntimeClassSource ¶ added in v1.1.0
ValidRuntimeClassSource reports whether source is local or managed.
func ValidateCatalogApply ¶ added in v1.1.0
func ValidateCatalogApply(c *ModelCatalog, requiredSource string, lookup ModelStatusLookup) error
ValidateCatalogApply checks source scope plus Failed/missing names for apply-time reject. Pending and Pulling names are allowed so the workload can wait for download.
func ValidateCatalogModelSources ¶ added in v1.1.0
func ValidateCatalogModelSources(c *ModelCatalog, requiredSource string, lookup ModelSourceLookup) error
ValidateCatalogModelSources checks that every named item exists with the required source.
func ValidateControlPlaneTLSPath ¶
ValidateControlPlaneTLSPath canonicalizes and validates a host TLS directory path.
func ValidateExecMessage ¶
func ValidateExecMessage(em *ExecMessage) error
ValidateExecMessage validates an ExecMessage
func ValidateFieldAgentStatus ¶
func ValidateFieldAgentStatus(fa *FieldAgentStatus) error
ValidateFieldAgentStatus validates a FieldAgentStatus
func ValidateKnowledgeCatalog ¶ added in v1.1.0
func ValidateKnowledgeCatalog(c *KnowledgeCatalog, volumeDests, tmpfsPaths, modelPaths []string) error
ValidateKnowledgeCatalog checks knowledge catalog shape, permissions, duplicates, and path collisions. Occupied paths include volumes, tmpfs, and model catalog bindPath / {bindPath}/{name}. Omitted catalog or empty items do not require bindPath. Permissions default to ro when items are present.
func ValidateKnowledgeCatalogApply ¶ added in v1.1.0
func ValidateKnowledgeCatalogApply(c *KnowledgeCatalog, requiredSource string, lookup KnowledgeStatusLookup) error
ValidateKnowledgeCatalogApply checks source scope plus Failed/missing names for apply-time reject. Pending and Pulling names are allowed so the workload can wait for download.
func ValidateLogMessage ¶
func ValidateLogMessage(lm *LogMessage) error
ValidateLogMessage validates a LogMessage
func ValidateMicroserviceStatus ¶
func ValidateMicroserviceStatus(ms *MicroserviceStatus) error
ValidateMicroserviceStatus validates a MicroserviceStatus
func ValidateModelCatalog ¶ added in v1.1.0
func ValidateModelCatalog(c *ModelCatalog, volumeDests, tmpfsPaths []string) error
ValidateModelCatalog checks catalog shape, permissions, duplicates, and path collisions. Omitted catalog or empty items do not require bindPath. Permissions default to ro when items are present.
func ValidatePortMapping ¶
func ValidatePortMapping(p *PortMapping) error
ValidatePortMapping validates a PortMapping
func ValidateRegistry ¶
ValidateRegistry validates a Registry
func ValidateStatusReporterStatus ¶
func ValidateStatusReporterStatus(sr *StatusReporterStatus) error
ValidateStatusReporterStatus validates a StatusReporterStatus
func ValidateVolumeMapping ¶
func ValidateVolumeMapping(v *VolumeMapping) error
ValidateVolumeMapping validates a VolumeMapping
func ValidateWorkloadCatalogs ¶ added in v1.1.0
func ValidateWorkloadCatalogs(models *ModelCatalog, knowledge *KnowledgeCatalog, volumeDests, tmpfsPaths []string) error
ValidateWorkloadCatalogs validates models and knowledge catalogs, including collisions between them.
func ValidateYamlConfig ¶
func ValidateYamlConfig(yc *YamlConfig) error
ValidateYamlConfig validates a YamlConfig
func VolumeScopeKnown ¶ added in v1.1.0
VolumeScopeKnown reports whether raw is omit/empty, private, or shared.
Types ¶
type CatalogGateDecision ¶ added in v1.1.0
type CatalogGateDecision int
CatalogGateDecision is whether a workload may create, must wait, or has failed.
const ( CatalogGateAllow CatalogGateDecision = iota CatalogGateWait CatalogGateFail )
Catalog start-gate outcomes.
func CombineCatalogStartGates ¶ added in v1.1.0
func CombineCatalogStartGates(modelDec CatalogGateDecision, modelMsg string, knowledgeDec CatalogGateDecision, knowledgeMsg string) (CatalogGateDecision, string)
CombineCatalogStartGates merges model and knowledge start-gate outcomes. Fail wins, then wait. The workload starts only when both catalogs allow.
func EvaluateCatalogStartGate ¶ added in v1.1.0
func EvaluateCatalogStartGate(c *ModelCatalog, requiredSource string, lookup ModelStatusLookup) (CatalogGateDecision, string, error)
EvaluateCatalogStartGate decides create vs wait vs fail from named item status.
func EvaluateKnowledgeCatalogStartGate ¶ added in v1.1.0
func EvaluateKnowledgeCatalogStartGate(c *KnowledgeCatalog, requiredSource string, lookup KnowledgeStatusLookup) (CatalogGateDecision, string, error)
EvaluateKnowledgeCatalogStartGate decides create vs wait vs fail from named Knowledge status.
type ControlPlaneAuthBootstrap ¶
type ControlPlaneAuthBootstrap struct {
Username string `yaml:"username,omitempty" json:"username,omitempty"`
Password string `yaml:"password,omitempty" json:"password,omitempty"`
}
ControlPlaneAuthBootstrap holds embedded OIDC bootstrap admin credentials.
type ControlPlaneAuthClient ¶
type ControlPlaneAuthClient struct {
ID string `yaml:"id,omitempty" json:"id,omitempty"`
Secret string `yaml:"secret,omitempty" json:"secret,omitempty"`
}
ControlPlaneAuthClient holds OIDC confidential client credentials.
type ControlPlaneAuthOIDCTTL ¶
type ControlPlaneAuthOIDCTTL struct {
InteractionTTLSeconds *int `yaml:"interactionTtlSeconds,omitempty" json:"interactionTtlSeconds,omitempty"`
GrantTTLSeconds *int `yaml:"grantTtlSeconds,omitempty" json:"grantTtlSeconds,omitempty"`
SessionTTLSeconds *int `yaml:"sessionTtlSeconds,omitempty" json:"sessionTtlSeconds,omitempty"`
IDTokenTTLSeconds *int `yaml:"idTokenTtlSeconds,omitempty" json:"idTokenTtlSeconds,omitempty"`
}
ControlPlaneAuthOIDCTTL configures embedded OIDC provider TTL overrides.
type ControlPlaneAuthRateLimit ¶
type ControlPlaneAuthRateLimit struct {
Enabled *bool `yaml:"enabled,omitempty" json:"enabled,omitempty"`
MaxRequestsPerWindow *int `yaml:"maxRequestsPerWindow,omitempty" json:"maxRequestsPerWindow,omitempty"`
WindowMs *int `yaml:"windowMs,omitempty" json:"windowMs,omitempty"`
}
ControlPlaneAuthRateLimit configures auth endpoint rate limiting.
type ControlPlaneAuthSessionStore ¶
type ControlPlaneAuthSessionStore struct {
Type string `yaml:"type,omitempty" json:"type,omitempty"`
TTLMs *int `yaml:"ttlMs,omitempty" json:"ttlMs,omitempty"`
Secret string `yaml:"secret,omitempty" json:"secret,omitempty"`
}
ControlPlaneAuthSessionStore configures OAuth BFF session storage.
type ControlPlaneAuthSpec ¶
type ControlPlaneAuthSpec struct {
Mode string `yaml:"mode,omitempty" json:"mode,omitempty"`
InsecureAllowHTTP *bool `yaml:"insecureAllowHttp,omitempty" json:"insecureAllowHttp,omitempty"`
InsecureAllowBootstrapLog *bool `yaml:"insecureAllowBootstrapLog,omitempty" json:"insecureAllowBootstrapLog,omitempty"`
Bootstrap *ControlPlaneAuthBootstrap `yaml:"bootstrap,omitempty" json:"bootstrap,omitempty"`
IssuerURL string `yaml:"issuerUrl,omitempty" json:"issuerUrl,omitempty"`
IssuerCA string `yaml:"issuerCa,omitempty" json:"issuerCa,omitempty"`
Client *ControlPlaneAuthClient `yaml:"client,omitempty" json:"client,omitempty"`
ConsoleClient string `yaml:"consoleClient,omitempty" json:"consoleClient,omitempty"`
ConsoleClientEnabled *bool `yaml:"consoleClientEnabled,omitempty" json:"consoleClientEnabled,omitempty"`
RateLimit *ControlPlaneAuthRateLimit `yaml:"rateLimit,omitempty" json:"rateLimit,omitempty"`
SessionStore *ControlPlaneAuthSessionStore `yaml:"sessionStore,omitempty" json:"sessionStore,omitempty"`
TokenTTL *ControlPlaneAuthTokenTTL `yaml:"tokenTtl,omitempty" json:"tokenTtl,omitempty"`
OIDCTTL *ControlPlaneAuthOIDCTTL `yaml:"oidcTtl,omitempty" json:"oidcTtl,omitempty"`
}
ControlPlaneAuthSpec configures Controller OIDC (embedded or external).
func ValidEmbeddedAuthForTest ¶
func ValidEmbeddedAuthForTest() *ControlPlaneAuthSpec
ValidEmbeddedAuthForTest returns a minimal valid embedded auth block for unit tests.
type ControlPlaneAuthTokenTTL ¶
type ControlPlaneAuthTokenTTL struct {
AccessTokenTTLSeconds *int `yaml:"accessTokenTtlSeconds,omitempty" json:"accessTokenTtlSeconds,omitempty"`
RefreshTokenTTLSeconds *int `yaml:"refreshTokenTtlSeconds,omitempty" json:"refreshTokenTtlSeconds,omitempty"`
}
ControlPlaneAuthTokenTTL configures JWT access/refresh token TTL overrides.
type ControlPlaneConsoleSpec ¶
type ControlPlaneConsoleSpec struct {
Port *int `yaml:"port,omitempty" json:"port,omitempty"`
URL string `yaml:"url,omitempty" json:"url,omitempty"`
}
ControlPlaneConsoleSpec configures EdgeOps Console exposure.
type ControlPlaneDeployment ¶
type ControlPlaneDeployment struct {
ControllerUUID string
Namespace string
Name string
ManifestYAML string
Image string
State string
ContainerID string
DesiredState string
RuntimeState string
LastError string
RestartCount int
LastTransitionAt int64
LastReconcileAt int64
LastStartAttemptAt int64
FailureCount int
DeletedAt *int64
Generation int64
ObservedGeneration int64
ControllerRegistered bool
InitialRebuildSkipped bool
}
ControlPlaneDeployment is the singleton SQLite record for a local ControlPlane manifest.
func (*ControlPlaneDeployment) NormalizeDefaults ¶
func (d *ControlPlaneDeployment) NormalizeDefaults()
NormalizeDefaults ensures lifecycle defaults for control plane records.
type ControlPlaneManifest ¶
type ControlPlaneManifest struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata struct {
Name string `yaml:"name" json:"name"`
Namespace string `yaml:"namespace,omitempty" json:"namespace,omitempty"`
Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"`
} `yaml:"metadata" json:"metadata"`
Spec ControlPlaneManifestSpec `yaml:"spec" json:"spec"`
}
ControlPlaneManifest is the operator YAML for kind ControlPlane.
func DecodeControlPlaneManifestYAML ¶
func DecodeControlPlaneManifestYAML(manifest string) (*ControlPlaneManifest, error)
DecodeControlPlaneManifestYAML decodes ControlPlane YAML without semantic validation.
func ParseControlPlaneManifest ¶
func ParseControlPlaneManifest(manifest string) (*ControlPlaneManifest, error)
ParseControlPlaneManifest decodes and validates ControlPlane YAML.
func (*ControlPlaneManifest) ControllerRegistryID ¶
func (m *ControlPlaneManifest) ControllerRegistryID() (int, bool)
ControllerRegistryID returns spec.controller.registry when set.
func (*ControlPlaneManifest) ManifestControllerImage ¶
func (m *ControlPlaneManifest) ManifestControllerImage() string
ManifestControllerImage returns spec.controller.image trimmed.
func (*ControlPlaneManifest) MaskSecrets ¶
func (m *ControlPlaneManifest) MaskSecrets()
MaskSecrets redacts sensitive ControlPlane manifest fields in place.
func (*ControlPlaneManifest) NormalizeDefaults ¶
func (m *ControlPlaneManifest) NormalizeDefaults()
NormalizeDefaults applies metadata defaults before validation or env build.
func (*ControlPlaneManifest) Validate ¶
func (m *ControlPlaneManifest) Validate() error
Validate checks ControlPlane manifest semantics.
type ControlPlaneManifestSpec ¶
type ControlPlaneManifestSpec struct {
Controller struct {
Image string `yaml:"image" json:"image"`
Registry *int `yaml:"registry,omitempty" json:"registry,omitempty"`
Port *int `yaml:"port,omitempty" json:"port,omitempty"`
PublicURL string `yaml:"publicUrl,omitempty" json:"publicUrl,omitempty"`
TrustProxy *bool `yaml:"trustProxy,omitempty" json:"trustProxy,omitempty"`
} `yaml:"controller" json:"controller"`
Console ControlPlaneConsoleSpec `yaml:"console,omitempty" json:"console,omitempty"`
Auth *ControlPlaneAuthSpec `yaml:"auth,omitempty" json:"auth,omitempty"`
Database *struct {
Provider string `yaml:"provider,omitempty" json:"provider,omitempty"`
User string `yaml:"user,omitempty" json:"user,omitempty"`
Host string `yaml:"host,omitempty" json:"host,omitempty"`
Port *int `yaml:"port,omitempty" json:"port,omitempty"`
Password string `yaml:"password,omitempty" json:"password,omitempty"`
DatabaseName string `yaml:"databaseName,omitempty" json:"databaseName,omitempty"`
SSL *bool `yaml:"ssl,omitempty" json:"ssl,omitempty"`
CA string `yaml:"ca,omitempty" json:"ca,omitempty"`
} `yaml:"database,omitempty" json:"database,omitempty"`
Events *struct {
AuditEnabled *bool `yaml:"auditEnabled,omitempty" json:"auditEnabled,omitempty"`
RetentionDays *int `yaml:"retentionDays,omitempty" json:"retentionDays,omitempty"`
CleanupInterval *int `yaml:"cleanupInterval,omitempty" json:"cleanupInterval,omitempty"`
CaptureIPAddress *bool `yaml:"captureIpAddress,omitempty" json:"captureIpAddress,omitempty"`
} `yaml:"events,omitempty" json:"events,omitempty"`
SystemMicroservices *struct {
Router map[string]string `yaml:"router,omitempty" json:"router,omitempty"`
NATS map[string]string `yaml:"nats,omitempty" json:"nats,omitempty"`
} `yaml:"systemMicroservices,omitempty" json:"systemMicroservices,omitempty"`
NATS *struct {
Enabled *bool `yaml:"enabled,omitempty" json:"enabled,omitempty"`
} `yaml:"nats,omitempty" json:"nats,omitempty"`
LogLevel string `yaml:"logLevel,omitempty" json:"logLevel,omitempty"`
TLS *ControlPlaneTLSConfig `yaml:"tls,omitempty" json:"tls,omitempty"`
Vault *ControlPlaneVaultSpec `yaml:"vault,omitempty" json:"vault,omitempty"`
// Forbidden in Edgelet ControlPlane YAML (potctl REST import only).
SiteCA any `yaml:"siteCA,omitempty" json:"-"`
LocalCA any `yaml:"localCA,omitempty" json:"-"`
}
ControlPlaneManifestSpec holds controller deployment configuration.
type ControlPlaneTLSBase64 ¶
type ControlPlaneTLSBase64 struct {
Cert string `yaml:"cert,omitempty" json:"cert,omitempty"`
Key string `yaml:"key,omitempty" json:"key,omitempty"`
CA string `yaml:"ca,omitempty" json:"ca,omitempty"`
}
ControlPlaneTLSBase64 holds inline TLS material for ControlPlane listeners.
type ControlPlaneTLSConfig ¶
type ControlPlaneTLSConfig struct {
Path string `yaml:"path,omitempty" json:"path,omitempty"`
Base64 *ControlPlaneTLSBase64 `yaml:"base64,omitempty" json:"base64,omitempty"`
}
ControlPlaneTLSConfig configures TLS for the control plane controller.
type ControlPlaneVaultSpec ¶
type ControlPlaneVaultSpec struct {
Enabled *bool `yaml:"enabled,omitempty" json:"enabled,omitempty"`
Provider string `yaml:"provider,omitempty" json:"provider,omitempty"`
BasePath string `yaml:"basePath,omitempty" json:"basePath,omitempty"`
Hashicorp *struct {
Address string `yaml:"address,omitempty" json:"address,omitempty"`
Token string `yaml:"token,omitempty" json:"token,omitempty"`
Mount string `yaml:"mount,omitempty" json:"mount,omitempty"`
} `yaml:"hashicorp,omitempty" json:"hashicorp,omitempty"`
AWS *struct {
Region string `yaml:"region,omitempty" json:"region,omitempty"`
AccessKeyID string `yaml:"accessKeyId,omitempty" json:"accessKeyId,omitempty"`
AccessKey string `yaml:"accessKey,omitempty" json:"accessKey,omitempty"`
} `yaml:"aws,omitempty" json:"aws,omitempty"`
Azure *struct {
URL string `yaml:"url,omitempty" json:"url,omitempty"`
TenantID string `yaml:"tenantId,omitempty" json:"tenantId,omitempty"`
ClientID string `yaml:"clientId,omitempty" json:"clientId,omitempty"`
ClientSecret string `yaml:"clientSecret,omitempty" json:"clientSecret,omitempty"`
} `yaml:"azure,omitempty" json:"azure,omitempty"`
Google *struct {
ProjectID string `yaml:"projectId,omitempty" json:"projectId,omitempty"`
Credentials string `yaml:"credentials,omitempty" json:"credentials,omitempty"`
} `yaml:"google,omitempty" json:"google,omitempty"`
}
ControlPlaneVaultSpec mirrors optional vault provider blocks.
type ControllerKnowledge ¶ added in v1.1.0
type ControllerKnowledge struct {
UUID string `json:"uuid"`
Name string `json:"name"`
RegistryID int `json:"registryId"`
Repo string `json:"repo"`
Revision string `json:"revision,omitempty"`
FilesJSON string `json:"filesJson,omitempty"`
Format string `json:"format,omitempty"`
State string `json:"state"`
ResolvedRevision string `json:"resolvedRevision,omitempty"`
Digest string `json:"digest,omitempty"`
RevisionFloating bool `json:"revisionFloating,omitempty"`
TotalBytes int64 `json:"totalBytes,omitempty"`
LastError string `json:"lastError,omitempty"`
}
ControllerKnowledge is a fleet-desired Knowledge row. Identity is uuid plus unique name.
func (*ControllerKnowledge) Files ¶ added in v1.1.0
func (k *ControllerKnowledge) Files() []string
Files returns the decoded spec.files list (empty slice when unset).
func (*ControllerKnowledge) NormalizeDefaults ¶ added in v1.1.0
func (k *ControllerKnowledge) NormalizeDefaults()
NormalizeDefaults trims ControllerKnowledge identity fields.
func (*ControllerKnowledge) SetFiles ¶ added in v1.1.0
func (k *ControllerKnowledge) SetFiles(files []string)
SetFiles encodes spec.files as JSON for persistence.
func (*ControllerKnowledge) ToLocalKnowledge ¶ added in v1.1.0
func (k *ControllerKnowledge) ToLocalKnowledge() *LocalKnowledge
ToLocalKnowledge builds a Pending local row from a controller-desired Knowledge.
type ControllerModel ¶ added in v1.1.0
type ControllerModel struct {
UUID string `json:"uuid"`
Name string `json:"name"`
Repo string `json:"repo"`
Revision string `json:"revision,omitempty"`
RegistryID int `json:"registryId"`
FilesJSON string `json:"filesJson,omitempty"`
Format string `json:"format,omitempty"`
}
ControllerModel is a fleet-desired Model row. Identity is uuid plus unique name.
func (*ControllerModel) Files ¶ added in v1.1.0
func (m *ControllerModel) Files() []string
Files returns the decoded spec.files list (empty slice when unset).
func (*ControllerModel) NormalizeDefaults ¶ added in v1.1.0
func (m *ControllerModel) NormalizeDefaults()
NormalizeDefaults trims ControllerModel identity fields.
func (*ControllerModel) SetFiles ¶ added in v1.1.0
func (m *ControllerModel) SetFiles(files []string)
SetFiles encodes spec.files as JSON for persistence.
func (*ControllerModel) ToLocalModel ¶ added in v1.1.0
func (m *ControllerModel) ToLocalModel() *LocalModel
ToLocalModel builds a Pending local row from a controller-desired Model.
type ControllerRuntimeClass ¶ added in v1.1.0
ControllerRuntimeClass is a fleet-desired RuntimeClass row (name + handler).
func (*ControllerRuntimeClass) NormalizeDefaults ¶ added in v1.1.0
func (r *ControllerRuntimeClass) NormalizeDefaults()
NormalizeDefaults trims and lowercases fleet RuntimeClass identity fields.
type ControllerStatus ¶
type ControllerStatus string
ControllerStatus represents the controller connection status
const ( ControllerStatusOK ControllerStatus = "OK" ControllerStatusNotConnected ControllerStatus = "NOT_CONNECTED" ControllerStatusNotProvisioned ControllerStatus = "NOT_PROVISIONED" ControllerStatusBrokenCertificate ControllerStatus = "BROKEN_CERTIFICATE" ControllerStatusBadRequest ControllerStatus = "BAD_REQUEST" ControllerStatusNotFound ControllerStatus = "NOT_FOUND" ControllerStatusInternalError ControllerStatus = "INTERNAL_ERROR" )
type DeviceMapping ¶ added in v1.1.0
type DeviceMapping struct {
HostPath string `json:"hostPath" yaml:"hostPath"`
ContainerPath string `json:"containerPath" yaml:"containerPath"`
Permissions string `json:"permissions,omitempty" yaml:"permissions,omitempty"`
}
DeviceMapping is a host /dev device exposed into the container.
type EdgeletAPIStatus ¶
type EdgeletAPIStatus struct {
OpenConfigSocketsCount int `json:"openConfigSocketsCount" yaml:"openConfigSocketsCount"` // Number of open control/config sockets
OpenMessageSocketsCount int `json:"openMessageSocketsCount" yaml:"openMessageSocketsCount"` // Number of open message sockets
}
EdgeletAPIStatus represents the Edgelet API status
func NewEdgeletAPIStatus ¶
func NewEdgeletAPIStatus() *EdgeletAPIStatus
NewEdgeletAPIStatus creates a new EdgeletAPIStatus
func (*EdgeletAPIStatus) SetOpenConfigSocketsCount ¶
func (l *EdgeletAPIStatus) SetOpenConfigSocketsCount(count int) *EdgeletAPIStatus
SetOpenConfigSocketsCount sets the open config sockets count and returns the status for chaining
type ErrKnowledgeFailed ¶ added in v1.1.0
ErrKnowledgeFailed is returned when a knowledge catalog item names a Failed Knowledge.
func (*ErrKnowledgeFailed) Error ¶ added in v1.1.0
func (e *ErrKnowledgeFailed) Error() string
type ErrKnowledgeSourceScope ¶ added in v1.1.0
ErrKnowledgeSourceScope is returned when a knowledge catalog item name is missing or not allowed for this microservice (local workloads bind local Knowledge only; controller workloads bind managed Knowledge only).
func (*ErrKnowledgeSourceScope) Error ¶ added in v1.1.0
func (e *ErrKnowledgeSourceScope) Error() string
type ErrModelFailed ¶ added in v1.1.0
ErrModelFailed is returned when a catalog item names a Failed model.
func (*ErrModelFailed) Error ¶ added in v1.1.0
func (e *ErrModelFailed) Error() string
type ErrModelSourceScope ¶ added in v1.1.0
ErrModelSourceScope is returned when a catalog item name is missing or not allowed for this microservice (local workloads bind local models only; controller workloads bind managed models only).
func (*ErrModelSourceScope) Error ¶ added in v1.1.0
func (e *ErrModelSourceScope) Error() string
type ExecMessage ¶
type ExecMessage struct {
Type byte `json:"type" yaml:"type"` // 0: STDIN, 1: STDOUT, 2: STDERR, 3: CONTROL
Data []byte `json:"data" yaml:"data"`
MicroserviceUUID string `json:"microserviceUuid" yaml:"microserviceUuid"`
ExecID string `json:"execId" yaml:"execId"`
Timestamp int64 `json:"timestamp" yaml:"timestamp"`
}
ExecMessage represents a message for exec session WebSocket communication
func NewExecMessage ¶
func NewExecMessage(msgType byte, data []byte, microserviceUUID, execID string) *ExecMessage
NewExecMessage creates a new ExecMessage
type FieldAgentStatus ¶
type FieldAgentStatus struct {
ControllerStatus ControllerStatus `json:"controllerStatus" yaml:"controllerStatus"`
LastCommandTime int64 `json:"lastCommandTime" yaml:"lastCommandTime"`
ControllerVerified bool `json:"controllerVerified" yaml:"controllerVerified"`
ReadyToUpgrade bool `json:"readyToUpgrade" yaml:"readyToUpgrade"`
ReadyToRollback bool `json:"readyToRollback" yaml:"readyToRollback"`
}
FieldAgentStatus represents the Field Agent status
func NewFieldAgentStatus ¶
func NewFieldAgentStatus() *FieldAgentStatus
NewFieldAgentStatus creates a new FieldAgentStatus with default values
type Healthcheck ¶
type Healthcheck struct {
Test []string `json:"test" yaml:"test"`
Interval *int64 `json:"interval,omitempty" yaml:"interval,omitempty"`
Timeout *int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"`
StartPeriod *int64 `json:"startPeriod,omitempty" yaml:"startPeriod,omitempty"`
StartInterval *int64 `json:"startInterval,omitempty" yaml:"startInterval,omitempty"`
Retries *int `json:"retries,omitempty" yaml:"retries,omitempty"`
}
Healthcheck represents container healthcheck configuration
func NewHealthcheck ¶
func NewHealthcheck(test []string, interval, timeout, startPeriod, startInterval *int64, retries *int) *Healthcheck
NewHealthcheck creates a new Healthcheck
func (*Healthcheck) Equals ¶
func (h *Healthcheck) Equals(other *Healthcheck) bool
Equals checks if two Healthchecks are equal
type KnowledgeCatalog ¶ added in v1.1.0
type KnowledgeCatalog struct {
BindPath string `json:"bindPath,omitempty" yaml:"bindPath,omitempty"`
Permissions string `json:"permissions,omitempty" yaml:"permissions,omitempty"`
Items []KnowledgeCatalogItem `json:"items,omitempty" yaml:"items,omitempty"`
}
KnowledgeCatalog is the microservice knowledge catalog bind (bindPath + items by name).
func (*KnowledgeCatalog) Clone ¶ added in v1.1.0
func (c *KnowledgeCatalog) Clone() *KnowledgeCatalog
Clone returns a shallow copy of the knowledge catalog (nil-safe).
func (*KnowledgeCatalog) HasItems ¶ added in v1.1.0
func (c *KnowledgeCatalog) HasItems() bool
HasItems reports whether the knowledge catalog lists at least one item.
func (*KnowledgeCatalog) ItemContainerPath ¶ added in v1.1.0
func (c *KnowledgeCatalog) ItemContainerPath(name string) string
ItemContainerPath is the in-container path for one knowledge catalog item: {bindPath}/{name}.
func (*KnowledgeCatalog) NormalizeDefaults ¶ added in v1.1.0
func (c *KnowledgeCatalog) NormalizeDefaults()
NormalizeDefaults trims fields and defaults permissions to ro when items are present.
type KnowledgeCatalogItem ¶ added in v1.1.0
type KnowledgeCatalogItem struct {
Name string `json:"name" yaml:"name"`
}
KnowledgeCatalogItem names one Knowledge whose Ready content/ is projected under bindPath.
type KnowledgeStatusInfo ¶ added in v1.1.0
type KnowledgeStatusInfo struct {
Source string
State string
Exists bool
Generation int64
ContentPath string
LastError string
}
KnowledgeStatusInfo is the stored identity and lifecycle of one named Knowledge.
type KnowledgeStatusLookup ¶ added in v1.1.0
type KnowledgeStatusLookup func(name string) (KnowledgeStatusInfo, error)
KnowledgeStatusLookup returns stored status for a Knowledge name. Exists is false when the name is not present.
type LocalDeployManifest ¶
type LocalDeployManifest struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata struct {
Name string `yaml:"name" json:"name"`
Namespace string `yaml:"namespace,omitempty" json:"namespace,omitempty"`
Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"`
} `yaml:"metadata" json:"metadata"`
Spec struct {
Image string `yaml:"image" json:"image"`
Registry *int `yaml:"registry,omitempty" json:"registry,omitempty"`
Models *ModelCatalog `yaml:"models,omitempty" json:"models,omitempty"`
Knowledge *KnowledgeCatalog `yaml:"knowledge,omitempty" json:"knowledge,omitempty"`
Container struct {
Annotations map[string]any `yaml:"annotations,omitempty" json:"annotations,omitempty"`
HostNetworkMode bool `yaml:"hostNetworkMode" json:"hostNetworkMode"`
IsPrivileged bool `yaml:"isPrivileged" json:"isPrivileged"`
CapAdd []string `yaml:"capAdd,omitempty" json:"capAdd,omitempty"`
CapDrop []string `yaml:"capDrop,omitempty" json:"capDrop,omitempty"`
IpcMode string `yaml:"ipcMode,omitempty" json:"ipcMode,omitempty"`
PidMode string `yaml:"pidMode,omitempty" json:"pidMode,omitempty"`
RunAsUser string `yaml:"runAsUser,omitempty" json:"runAsUser,omitempty"`
RunAsGroup string `yaml:"runAsGroup,omitempty" json:"runAsGroup,omitempty"`
SupplementalGroups []any `yaml:"supplementalGroups,omitempty" json:"supplementalGroups,omitempty"`
ReadOnlyRootFilesystem bool `yaml:"readOnlyRootFilesystem,omitempty" json:"readOnlyRootFilesystem,omitempty"`
Platform string `yaml:"platform,omitempty" json:"platform,omitempty"`
Runtime string `yaml:"runtime,omitempty" json:"runtime,omitempty"`
CDIDevices []string `yaml:"cdiDevices,omitempty" json:"cdiDevices,omitempty"`
Sysctls map[string]string `yaml:"sysctls,omitempty" json:"sysctls,omitempty"`
Ulimits map[string]Ulimit `yaml:"ulimits,omitempty" json:"ulimits,omitempty"`
Devices []DeviceMapping `yaml:"devices,omitempty" json:"devices,omitempty"`
Tmpfs []TmpfsMount `yaml:"tmpfs,omitempty" json:"tmpfs,omitempty"`
Volumes []struct {
HostDestination string `yaml:"hostDestination" json:"hostDestination"`
ContainerDestination string `yaml:"containerDestination" json:"containerDestination"`
AccessMode string `yaml:"accessMode,omitempty" json:"accessMode,omitempty"`
Type string `yaml:"type,omitempty" json:"type,omitempty"`
Scope string `yaml:"scope,omitempty" json:"scope,omitempty"`
} `yaml:"volumes,omitempty" json:"volumes,omitempty"`
ExtraHosts []struct {
Name string `yaml:"name" json:"name"`
Address string `yaml:"address" json:"address"`
} `yaml:"extraHosts,omitempty" json:"extraHosts,omitempty"`
Env []struct {
Key string `yaml:"key" json:"key"`
Value string `yaml:"value" json:"value"`
} `yaml:"env,omitempty" json:"env,omitempty"`
Ports []struct {
Internal int `yaml:"internal" json:"internal"`
External int `yaml:"external" json:"external"`
Protocol string `yaml:"protocol,omitempty" json:"protocol,omitempty"`
} `yaml:"ports,omitempty" json:"ports,omitempty"`
WorkingDir string `yaml:"workingDir,omitempty" json:"workingDir,omitempty"`
Entrypoint *[]string `yaml:"entrypoint,omitempty" json:"entrypoint,omitempty"`
Commands *[]string `yaml:"commands,omitempty" json:"commands,omitempty"`
CPUSetCpus string `yaml:"cpuSetCpus,omitempty" json:"cpuSetCpus,omitempty"`
Cpus *float64 `yaml:"cpus,omitempty" json:"cpus,omitempty"`
MemoryLimit int64 `yaml:"memoryLimit,omitempty" json:"memoryLimit,omitempty"`
MemoryReservation *int64 `yaml:"memoryReservation,omitempty" json:"memoryReservation,omitempty"`
MemorySwap *int64 `yaml:"memorySwap,omitempty" json:"memorySwap,omitempty"`
ShmSize *int64 `yaml:"shmSize,omitempty" json:"shmSize,omitempty"`
HealthCheck struct {
Test []string `yaml:"test,omitempty" json:"test,omitempty"`
Interval int `yaml:"interval,omitempty" json:"interval,omitempty"`
Timeout int `yaml:"timeout,omitempty" json:"timeout,omitempty"`
StartPeriod int `yaml:"startPeriod,omitempty" json:"startPeriod,omitempty"`
Retries int `yaml:"retries,omitempty" json:"retries,omitempty"`
} `yaml:"healthCheck,omitempty" json:"healthCheck,omitempty"`
} `yaml:"container,omitempty" json:"container,omitempty"`
Schedule int `yaml:"schedule,omitempty" json:"schedule,omitempty"`
Config map[string]any `yaml:"config,omitempty" json:"config,omitempty"`
} `yaml:"spec" json:"spec"`
}
LocalDeployManifest mirrors single-microservice deploy shape used by controller deploy flows.
func (*LocalDeployManifest) ManifestImage ¶
func (m *LocalDeployManifest) ManifestImage() string
ManifestImage returns the resolved container image from spec.image.
func (*LocalDeployManifest) Validate ¶
func (m *LocalDeployManifest) Validate() error
func (*LocalDeployManifest) ValidateCatalogApply ¶ added in v1.1.0
func (m *LocalDeployManifest) ValidateCatalogApply(lookup ModelStatusLookup) error
ValidateCatalogApply runs Validate then rejects unknown or Failed local catalog names.
func (*LocalDeployManifest) ValidateKnowledgeCatalogApply ¶ added in v1.1.0
func (m *LocalDeployManifest) ValidateKnowledgeCatalogApply(lookup KnowledgeStatusLookup) error
ValidateKnowledgeCatalogApply runs Validate then rejects unknown or Failed local Knowledge names.
func (*LocalDeployManifest) ValidateWithModelSources ¶ added in v1.1.0
func (m *LocalDeployManifest) ValidateWithModelSources(lookup ModelSourceLookup) error
ValidateWithModelSources runs Validate then checks catalog item names against a source lookup.
type LocalDeployedMicroservice ¶
type LocalDeployedMicroservice struct {
LocalUUID string
ApplicationName string
MicroserviceName string
SourceName string
ManifestYAML string
ImageName string
State string
ContainerID string
DesiredState string
RuntimeState string
LastError string
RestartCount int
LastTransitionAt int64
LastReconcileAt int64
LastStartAttemptAt int64
FailureCount int
DeletedAt *int64
Generation int64
ObservedGeneration int64
}
LocalDeployedMicroservice represents a microservice deployed by EdgeletAPI/CLI (not controller-managed).
func (*LocalDeployedMicroservice) IsDeleting ¶ added in v1.1.0
func (m *LocalDeployedMicroservice) IsDeleting() bool
IsDeleting reports whether a local remove is still in progress (container may still exist).
func (*LocalDeployedMicroservice) IsGone ¶ added in v1.1.0
func (m *LocalDeployedMicroservice) IsGone() bool
IsGone reports a local tombstone that should not appear in inventory or name reuse.
func (*LocalDeployedMicroservice) NormalizeDefaults ¶
func (m *LocalDeployedMicroservice) NormalizeDefaults()
NormalizeDefaults ensures lifecycle defaults are present for local records.
type LocalKnowledge ¶ added in v1.1.0
type LocalKnowledge struct {
Name string `json:"name"`
Generation int64 `json:"generation"`
Source string `json:"source,omitempty"`
RegistryID int `json:"registryId"`
Repo string `json:"repo"`
Revision string `json:"revision,omitempty"`
FilesJSON string `json:"filesJson,omitempty"`
Format string `json:"format,omitempty"`
State string `json:"state"`
ResolvedRevision string `json:"resolvedRevision,omitempty"`
Digest string `json:"digest,omitempty"`
RevisionFloating bool `json:"revisionFloating,omitempty"`
TotalBytes int64 `json:"totalBytes,omitempty"`
LastError string `json:"lastError,omitempty"`
}
LocalKnowledge is the persistent local Knowledge row stored in SQLite.
func (*LocalKnowledge) Files ¶ added in v1.1.0
func (k *LocalKnowledge) Files() []string
Files returns the decoded spec.files list (empty slice when unset).
func (*LocalKnowledge) NormalizeDefaults ¶ added in v1.1.0
func (k *LocalKnowledge) NormalizeDefaults()
NormalizeDefaults applies Knowledge row defaults used by store accessors.
func (*LocalKnowledge) SetFiles ¶ added in v1.1.0
func (k *LocalKnowledge) SetFiles(files []string)
SetFiles encodes spec.files as JSON for persistence.
type LocalKnowledgeManifest ¶ added in v1.1.0
type LocalKnowledgeManifest struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata struct {
Name string `yaml:"name" json:"name"`
Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"`
} `yaml:"metadata" json:"metadata"`
Spec LocalKnowledgeSpec `yaml:"spec" json:"spec"`
}
LocalKnowledgeManifest represents local Knowledge deployment YAML.
func (*LocalKnowledgeManifest) FilesJSON ¶ added in v1.1.0
func (m *LocalKnowledgeManifest) FilesJSON() string
FilesJSON returns the spec.files list encoded for SQLite.
func (*LocalKnowledgeManifest) ToLocalKnowledge ¶ added in v1.1.0
func (m *LocalKnowledgeManifest) ToLocalKnowledge() *LocalKnowledge
ToLocalKnowledge builds a store row from a validated manifest.
func (*LocalKnowledgeManifest) Validate ¶ added in v1.1.0
func (m *LocalKnowledgeManifest) Validate() error
func (*LocalKnowledgeManifest) ValidateWithRegistry ¶ added in v1.1.0
func (m *LocalKnowledgeManifest) ValidateWithRegistry(reg *Registry) error
ValidateWithRegistry validates the Knowledge document. When reg is non-nil (row exists), it checks id match and registry type compatibility.
type LocalKnowledgeSpec ¶ added in v1.1.0
type LocalKnowledgeSpec struct {
Repo string `yaml:"repo" json:"repo"`
Revision string `yaml:"revision,omitempty" json:"revision,omitempty"`
Registry int `yaml:"registry" json:"registry"`
Files []string `yaml:"files,omitempty" json:"files,omitempty"`
Format string `yaml:"format,omitempty" json:"format,omitempty"`
}
LocalKnowledgeSpec is the spec block of a local Knowledge deploy document.
type LocalModel ¶ added in v1.1.0
type LocalModel struct {
Name string `json:"name"`
Source string `json:"source,omitempty"`
Repo string `json:"repo"`
Revision string `json:"revision,omitempty"`
RegistryID int `json:"registryId"`
FilesJSON string `json:"filesJson,omitempty"`
Format string `json:"format,omitempty"`
State string `json:"state"`
LastError string `json:"lastError,omitempty"`
Generation int64 `json:"generation"`
ObservedGeneration int64 `json:"observedGeneration"`
ManifestYAML string `json:"manifestYaml,omitempty"`
ManifestPath string `json:"manifestPath,omitempty"`
ContentPath string `json:"contentPath,omitempty"`
ResolvedRevision string `json:"resolvedRevision,omitempty"`
Digest string `json:"digest,omitempty"`
RevisionFloating bool `json:"revisionFloating,omitempty"`
TotalBytes int64 `json:"totalBytes,omitempty"`
LastTransitionAt int64 `json:"lastTransitionAt,omitempty"`
LastReconcileAt int64 `json:"lastReconcileAt,omitempty"`
PulledAt int64 `json:"pulledAt,omitempty"`
}
LocalModel is the persistent local Model row stored in SQLite.
func (*LocalModel) Files ¶ added in v1.1.0
func (m *LocalModel) Files() []string
Files returns the decoded spec.files list (empty slice when unset).
func (*LocalModel) NormalizeDefaults ¶ added in v1.1.0
func (m *LocalModel) NormalizeDefaults()
NormalizeDefaults applies Model row defaults used by store accessors.
func (*LocalModel) SetFiles ¶ added in v1.1.0
func (m *LocalModel) SetFiles(files []string)
SetFiles encodes spec.files as JSON for persistence.
type LocalModelManifest ¶ added in v1.1.0
type LocalModelManifest struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata struct {
Name string `yaml:"name" json:"name"`
Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"`
} `yaml:"metadata" json:"metadata"`
Spec LocalModelSpec `yaml:"spec" json:"spec"`
}
LocalModelManifest represents local Model deployment YAML.
func (*LocalModelManifest) FilesJSON ¶ added in v1.1.0
func (m *LocalModelManifest) FilesJSON() string
FilesJSON returns the spec.files list encoded for SQLite.
func (*LocalModelManifest) ToLocalModel ¶ added in v1.1.0
func (m *LocalModelManifest) ToLocalModel() *LocalModel
ToLocalModel builds a store row from a validated manifest.
func (*LocalModelManifest) Validate ¶ added in v1.1.0
func (m *LocalModelManifest) Validate() error
func (*LocalModelManifest) ValidateWithRegistry ¶ added in v1.1.0
func (m *LocalModelManifest) ValidateWithRegistry(reg *Registry) error
ValidateWithRegistry validates the Model document. When reg is non-nil (row exists), it checks id match and registry type compatibility.
type LocalModelSpec ¶ added in v1.1.0
type LocalModelSpec struct {
Repo string `yaml:"repo" json:"repo"`
Revision string `yaml:"revision,omitempty" json:"revision,omitempty"`
Registry int `yaml:"registry" json:"registry"`
Files []string `yaml:"files,omitempty" json:"files,omitempty"`
Format string `yaml:"format,omitempty" json:"format,omitempty"`
}
LocalModelSpec is the spec block of a local Model deploy document.
type LocalRegistryManifest ¶
type LocalRegistryManifest struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Spec LocalRegistrySpec `yaml:"spec" json:"spec"`
}
LocalRegistryManifest represents local registry deployment YAML.
func (*LocalRegistryManifest) CollisionWith ¶ added in v1.1.0
func (m *LocalRegistryManifest) CollisionWith(existing *Registry) error
CollisionWith reports a validate error when existing has a different (type, url).
func (*LocalRegistryManifest) ToRegistry ¶ added in v1.1.0
func (m *LocalRegistryManifest) ToRegistry(id int) *Registry
ToRegistry builds a store Registry from the validated manifest and allocated/upsert id.
func (*LocalRegistryManifest) Validate ¶
func (m *LocalRegistryManifest) Validate() error
type LocalRegistrySpec ¶ added in v1.1.0
type LocalRegistrySpec struct {
ID int `yaml:"id,omitempty" json:"id,omitempty"`
Type string `yaml:"type,omitempty" json:"type,omitempty"`
URL string `yaml:"url" json:"url"`
UserName string `yaml:"username,omitempty" json:"username,omitempty"`
Password string `yaml:"password,omitempty" json:"password,omitempty"`
UserEmail string `yaml:"email,omitempty" json:"email,omitempty"`
Private bool `yaml:"private" json:"private"`
CA string `yaml:"ca,omitempty" json:"ca,omitempty"`
Insecure bool `yaml:"insecure" json:"insecure"`
}
LocalRegistrySpec is the spec block of a local Registry deploy document.
type LocalRuntimeClass ¶
type LocalRuntimeClass struct {
Name string `json:"name"`
Handler string `json:"handler"`
Source string `json:"source,omitempty"`
RuntimeName string `json:"runtimeName,omitempty"`
CreatedAt int64 `json:"createdAt,omitempty"`
UpdatedAt int64 `json:"updatedAt,omitempty"`
}
LocalRuntimeClass is the persistent RuntimeClass row stored in SQLite.
func (*LocalRuntimeClass) Normalize ¶
func (r *LocalRuntimeClass) Normalize()
func (*LocalRuntimeClass) RuntimeBinaryPath ¶
func (r *LocalRuntimeClass) RuntimeBinaryPath() string
type LocalRuntimeClassManifest ¶
type LocalRuntimeClassManifest struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Metadata struct {
Name string `yaml:"name" json:"name"`
} `yaml:"metadata" json:"metadata"`
Handler string `yaml:"handler" json:"handler"`
}
LocalRuntimeClassManifest represents local RuntimeClass deployment YAML. RuntimeClass uses top-level fields to keep local manifests concise.
func (*LocalRuntimeClassManifest) Validate ¶
func (m *LocalRuntimeClassManifest) Validate() error
type LogMessage ¶
type LogMessage struct {
Type byte `json:"type" yaml:"type"` // 6: LOG_LINE, 7: LOG_START, 8: LOG_STOP, 9: LOG_ERROR
Data []byte `json:"data" yaml:"data"`
SessionID string `json:"sessionId" yaml:"sessionId"`
MicroserviceUUID string `json:"microserviceUuid,omitempty" yaml:"microserviceUuid,omitempty"` // For microservice logs
IofogUUID string `json:"iofogUuid,omitempty" yaml:"iofogUuid,omitempty"` // For fog logs
Timestamp int64 `json:"timestamp" yaml:"timestamp"`
}
LogMessage represents a message for log session WebSocket communication
func NewLogMessage ¶
func NewLogMessage(msgType byte, data []byte, sessionID, microserviceUUID, iofogUUID string) *LogMessage
NewLogMessage creates a new LogMessage
type Microservice ¶
type Microservice struct {
// Required fields
MicroserviceUUID string `json:"microserviceUuid" yaml:"microserviceUuid"`
ImageName string `json:"imageName" yaml:"imageName"`
// Optional fields
PortMappings []*PortMapping `json:"portMappings,omitempty" yaml:"portMappings,omitempty"`
Config *string `json:"config,omitempty" yaml:"config,omitempty"`
RunAsUser *string `json:"runAsUser,omitempty" yaml:"runAsUser,omitempty"`
RunAsGroup *string `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
SupplementalGroups []int64 `json:"supplementalGroups,omitempty" yaml:"supplementalGroups,omitempty"`
Platform *string `json:"platform,omitempty" yaml:"platform,omitempty"`
Runtime *string `json:"runtime,omitempty" yaml:"runtime,omitempty"`
ContainerID string `json:"containerId" yaml:"containerId"`
RegistryID int `json:"registryId" yaml:"registryId"`
ContainerIPAddress *string `json:"containerIpAddress,omitempty" yaml:"containerIpAddress,omitempty"`
Rebuild bool `json:"rebuild" yaml:"rebuild"`
HostNetworkMode bool `json:"hostNetworkMode" yaml:"hostNetworkMode"`
IsPrivileged bool `json:"isPrivileged" yaml:"isPrivileged"`
LogSize int64 `json:"logSize" yaml:"logSize"`
VolumeMappings []*VolumeMapping `json:"volumeMappings,omitempty" yaml:"volumeMappings,omitempty"`
IsUpdating bool `json:"isUpdating" yaml:"isUpdating"`
EnvVars []*EnvVar `json:"envVars,omitempty" yaml:"envVars,omitempty"`
Args []string `json:"args,omitempty" yaml:"args,omitempty"`
Entrypoint *[]string `json:"entrypoint,omitempty" yaml:"entrypoint,omitempty"`
Commands *[]string `json:"commands,omitempty" yaml:"commands,omitempty"`
CdiDevs []string `json:"cdiDevs,omitempty" yaml:"cdiDevs,omitempty"`
Annotations *string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
CapAdd []string `json:"capAdd,omitempty" yaml:"capAdd,omitempty"`
CapDrop []string `json:"capDrop,omitempty" yaml:"capDrop,omitempty"`
ExtraHosts []string `json:"extraHosts,omitempty" yaml:"extraHosts,omitempty"`
IsRouter bool `json:"isRouter" yaml:"isRouter"`
IsController bool `json:"isController" yaml:"isController"`
IsSystem bool `json:"isSystem" yaml:"isSystem"`
PidMode *string `json:"pidMode,omitempty" yaml:"pidMode,omitempty"`
IpcMode *string `json:"ipcMode,omitempty" yaml:"ipcMode,omitempty"`
MicroserviceName string `json:"name" yaml:"name"`
ApplicationName string `json:"application" yaml:"application"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
IsNats bool `json:"isNats" yaml:"isNats"`
Schedule int `json:"schedule" yaml:"schedule"`
CPUSetCpus *string `json:"cpuSetCpus,omitempty" yaml:"cpuSetCpus,omitempty"`
Cpus *float64 `json:"cpus,omitempty" yaml:"cpus,omitempty"`
MemoryLimit *int64 `json:"memoryLimit,omitempty" yaml:"memoryLimit,omitempty"` // stored bytes; wire MiB (managed/local YAML)
MemoryReservation *int64 `json:"memoryReservation,omitempty" yaml:"memoryReservation,omitempty"` // stored bytes; wire MiB
MemorySwap *int64 `json:"memorySwap,omitempty" yaml:"memorySwap,omitempty"` // -1 unlimited; else stored bytes
ShmSize *int64 `json:"shmSize,omitempty" yaml:"shmSize,omitempty"` // stored bytes; wire MiB
ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty" yaml:"readOnlyRootFilesystem,omitempty"`
Sysctls map[string]string `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
Ulimits map[string]Ulimit `json:"ulimits,omitempty" yaml:"ulimits,omitempty"`
Devices []DeviceMapping `json:"devices,omitempty" yaml:"devices,omitempty"`
Tmpfs []TmpfsMount `json:"tmpfs,omitempty" yaml:"tmpfs,omitempty"`
WorkingDir *string `json:"workingDir,omitempty" yaml:"workingDir,omitempty"`
Models *ModelCatalog `json:"models,omitempty" yaml:"models,omitempty"`
Knowledge *KnowledgeCatalog `json:"knowledge,omitempty" yaml:"knowledge,omitempty"`
ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty" yaml:"serviceAccount,omitempty"`
// Internal state fields
Delete bool `json:"delete" yaml:"delete"`
DeleteWithCleanup bool `json:"deleteWithCleanup" yaml:"deleteWithCleanup"`
IsStuckInRestart bool `json:"isStuckInRestart" yaml:"isStuckInRestart"`
Healthcheck *Healthcheck `json:"healthcheck,omitempty" yaml:"healthcheck,omitempty"`
// contains filtered or unexported fields
}
Microservice represents a microservice/container configuration
func BuildMicroserviceFromLocalManifest ¶
func BuildMicroserviceFromLocalManifest(doc *LocalDeployManifest, deploymentID, image string) *Microservice
BuildMicroserviceFromLocalManifest converts a local deploy manifest into a runtime microservice model used by the container engine.
func NewMicroservice ¶
func NewMicroservice(microserviceUUID, imageName string) *Microservice
NewMicroservice creates a new Microservice with required fields
func (*Microservice) Equals ¶
func (m *Microservice) Equals(other *Microservice) bool
Equals checks if two Microservices are equal based on UUID
func (*Microservice) GetIsUpdating ¶
func (m *Microservice) GetIsUpdating() bool
IsUpdating returns whether the microservice is currently updating (thread-safe)
func (*Microservice) GetMemoryLimitMB ¶
func (m *Microservice) GetMemoryLimitMB() *int64
GetMemoryLimitMB returns the memory limit in MiB (from stored bytes).
func (*Microservice) GetMemoryReservationMB ¶ added in v1.1.0
func (m *Microservice) GetMemoryReservationMB() *int64
GetMemoryReservationMB returns the memory reservation in MiB (from stored bytes).
func (*Microservice) GetMemorySwapMB ¶ added in v1.1.0
func (m *Microservice) GetMemorySwapMB() *int64
GetMemorySwapMB returns memory+swap total in MiB, or -1 for unlimited.
func (*Microservice) GetShmSizeMB ¶ added in v1.1.0
func (m *Microservice) GetShmSizeMB() *int64
GetShmSizeMB returns /dev/shm size in MiB (from stored bytes).
func (*Microservice) MarshalKnowledgeJSON ¶ added in v1.1.0
func (m *Microservice) MarshalKnowledgeJSON() (string, error)
MarshalKnowledgeJSON encodes the knowledge catalog bind for the knowledge column. Empty catalog becomes {}.
func (*Microservice) MarshalModelsJSON ¶ added in v1.1.0
func (m *Microservice) MarshalModelsJSON() (string, error)
MarshalModelsJSON encodes the catalog bind for the models column. Empty catalog becomes {}.
func (*Microservice) SetIsUpdating ¶
func (m *Microservice) SetIsUpdating(updating bool)
SetIsUpdating sets the updating state (thread-safe)
func (*Microservice) SetMemoryLimitMB ¶
func (m *Microservice) SetMemoryLimitMB(memoryLimitMB *int64)
SetMemoryLimitMB sets the memory limit from MiB (managed/local wire) to stored bytes.
func (*Microservice) SetMemoryReservationMB ¶ added in v1.1.0
func (m *Microservice) SetMemoryReservationMB(mb *int64)
SetMemoryReservationMB sets the memory reservation from MiB to stored bytes.
func (*Microservice) SetMemorySwapMB ¶ added in v1.1.0
func (m *Microservice) SetMemorySwapMB(mb *int64)
SetMemorySwapMB sets memory+swap from MiB (-1 stays unlimited).
func (*Microservice) SetShmSizeMB ¶ added in v1.1.0
func (m *Microservice) SetShmSizeMB(mb *int64)
SetShmSizeMB sets /dev/shm size from MiB to stored bytes.
func (*Microservice) UnmarshalKnowledgeJSON ¶ added in v1.1.0
func (m *Microservice) UnmarshalKnowledgeJSON(raw string) error
UnmarshalKnowledgeJSON loads the knowledge catalog bind from the knowledge column.
func (*Microservice) UnmarshalModelsJSON ¶ added in v1.1.0
func (m *Microservice) UnmarshalModelsJSON(raw string) error
UnmarshalModelsJSON loads the catalog bind from the models column.
func (*Microservice) Validate ¶
func (m *Microservice) Validate() error
Validate validates the microservice configuration
func (*Microservice) ValidateCatalogApply ¶ added in v1.1.0
func (m *Microservice) ValidateCatalogApply(requiredSource string, lookup ModelStatusLookup) error
ValidateCatalogApply runs Validate then rejects unknown or Failed catalog names for requiredSource.
func (*Microservice) ValidateKnowledgeCatalogApply ¶ added in v1.1.0
func (m *Microservice) ValidateKnowledgeCatalogApply(requiredSource string, lookup KnowledgeStatusLookup) error
ValidateKnowledgeCatalogApply runs Validate then rejects unknown or Failed Knowledge names.
func (*Microservice) ValidateWithModelSources ¶ added in v1.1.0
func (m *Microservice) ValidateWithModelSources(requiredSource string, lookup ModelSourceLookup) error
ValidateWithModelSources runs Validate then checks catalog item names against a source lookup.
type MicroserviceState ¶
type MicroserviceState string
MicroserviceState represents the state of a microservice
const ( MicroserviceStateQueued MicroserviceState = "QUEUED" MicroserviceStatePulling MicroserviceState = "PULLING" MicroserviceStateCreating MicroserviceState = "CREATING" MicroserviceStateCreated MicroserviceState = "CREATED" MicroserviceStateStarting MicroserviceState = "STARTING" MicroserviceStateRunning MicroserviceState = "RUNNING" MicroserviceStateUpdating MicroserviceState = "UPDATING" MicroserviceStateRestarting MicroserviceState = "RESTARTING" MicroserviceStateExiting MicroserviceState = "EXITING" MicroserviceStateStuckInRestart MicroserviceState = "STUCK_IN_RESTART" MicroserviceStateFailed MicroserviceState = "FAILED" MicroserviceStateMarkedForDeletion MicroserviceState = "MARKED_FOR_DELETION" MicroserviceStateDeleting MicroserviceState = "DELETING" MicroserviceStateDeleted MicroserviceState = "DELETED" MicroserviceStateStopping MicroserviceState = "STOPPING" MicroserviceStateStopped MicroserviceState = "STOPPED" MicroserviceStateUnknown MicroserviceState = "UNKNOWN" )
func MicroserviceStateFromText ¶
func MicroserviceStateFromText(value string) MicroserviceState
FromText converts a string to MicroserviceState
type MicroserviceStatus ¶
type MicroserviceStatus struct {
Status MicroserviceState `json:"status" yaml:"status"`
StartTime int64 `json:"startTime" yaml:"startTime"`
CPUUsage float32 `json:"cpuUsage" yaml:"cpuUsage"`
MemoryUsage int64 `json:"memoryUsage" yaml:"memoryUsage"`
ContainerID string `json:"containerId" yaml:"containerId"`
PodID string `json:"podId,omitempty" yaml:"podId,omitempty"`
Percentage float32 `json:"percentage" yaml:"percentage"`
ErrorMessage *string `json:"errorMessage,omitempty" yaml:"errorMessage,omitempty"`
LastError string `json:"lastError,omitempty" yaml:"lastError,omitempty"`
LastErrorAt int64 `json:"lastErrorAt,omitempty" yaml:"lastErrorAt,omitempty"`
RestartCount int `json:"restartCount,omitempty" yaml:"restartCount,omitempty"`
ImagePullStatus string `json:"imagePullStatus,omitempty" yaml:"imagePullStatus,omitempty"`
IPAddress *string `json:"ipAddress,omitempty" yaml:"ipAddress,omitempty"`
ExecSessionIDs []string `json:"execSessionIds,omitempty" yaml:"execSessionIds,omitempty"`
HealthStatus *string `json:"healthStatus,omitempty" yaml:"healthStatus,omitempty"`
}
MicroserviceStatus represents the status of a microservice
func NewMicroserviceStatus ¶
func NewMicroserviceStatus() *MicroserviceStatus
NewMicroserviceStatus creates a new MicroserviceStatus with UNKNOWN state
func NewMicroserviceStatusWithState ¶
func NewMicroserviceStatusWithState(status MicroserviceState) *MicroserviceStatus
NewMicroserviceStatusWithState creates a new MicroserviceStatus with the given state
func (*MicroserviceStatus) AddExecSessionID ¶
func (m *MicroserviceStatus) AddExecSessionID(execSessionID string)
AddExecSessionID adds an exec session ID
func (*MicroserviceStatus) ApplyPodID ¶ added in v1.1.0
func (m *MicroserviceStatus) ApplyPodID(engineName, sandboxID string)
ApplyPodID sets PodID from the current engine and optional sandbox id.
func (*MicroserviceStatus) Equals ¶
func (m *MicroserviceStatus) Equals(other *MicroserviceStatus) bool
Equals checks if two MicroserviceStatuses are equal based on status
func (*MicroserviceStatus) GetExecSessionIDs ¶
func (m *MicroserviceStatus) GetExecSessionIDs() []string
GetExecSessionIDs returns the exec session IDs (never nil)
func (*MicroserviceStatus) GetOperatingDuration ¶
func (m *MicroserviceStatus) GetOperatingDuration() int64
GetOperatingDuration returns the operating duration in milliseconds
func (*MicroserviceStatus) RemoveExecSessionID ¶
func (m *MicroserviceStatus) RemoveExecSessionID(execSessionID string)
RemoveExecSessionID removes an exec session ID
type ModelCatalog ¶ added in v1.1.0
type ModelCatalog struct {
BindPath string `json:"bindPath,omitempty" yaml:"bindPath,omitempty"`
Permissions string `json:"permissions,omitempty" yaml:"permissions,omitempty"`
Items []ModelCatalogItem `json:"items,omitempty" yaml:"items,omitempty"`
}
ModelCatalog is the microservice catalog bind (bindPath + items by name).
func (*ModelCatalog) Clone ¶ added in v1.1.0
func (c *ModelCatalog) Clone() *ModelCatalog
Clone returns a shallow copy of the catalog (nil-safe).
func (*ModelCatalog) HasItems ¶ added in v1.1.0
func (c *ModelCatalog) HasItems() bool
HasItems reports whether the catalog lists at least one item.
func (*ModelCatalog) ItemContainerPath ¶ added in v1.1.0
func (c *ModelCatalog) ItemContainerPath(name string) string
ItemContainerPath is the in-container path for one catalog item: {bindPath}/{name}.
func (*ModelCatalog) NormalizeDefaults ¶ added in v1.1.0
func (c *ModelCatalog) NormalizeDefaults()
NormalizeDefaults trims fields and defaults permissions to ro when items are present.
type ModelCatalogItem ¶ added in v1.1.0
type ModelCatalogItem struct {
Name string `json:"name" yaml:"name"`
}
ModelCatalogItem names one model whose Ready content/ is projected under bindPath.
type ModelSourceLookup ¶ added in v1.1.0
ModelSourceLookup returns the stored source for a model name. exists is false when the name is not present.
type ModelStatusInfo ¶ added in v1.1.0
type ModelStatusInfo struct {
Source string
State string
Exists bool
Generation int64
ContentPath string
LastError string
}
ModelStatusInfo is the stored identity and lifecycle of one named model.
type ModelStatusLookup ¶ added in v1.1.0
type ModelStatusLookup func(name string) (ModelStatusInfo, error)
ModelStatusLookup returns stored status for a model name. Exists is false when the name is not present.
type ModuleStatus ¶
type ModuleStatus string
ModuleStatus represents the status of a module
const ( ModuleStatusStarting ModuleStatus = "STARTING" ModuleStatusRunning ModuleStatus = "RUNNING" ModuleStatusStopped ModuleStatus = "STOPPED" ModuleStatusWarning ModuleStatus = "WARNING" ModuleStatusUnknown ModuleStatus = "UNKNOWN" )
type PortMapping ¶
type PortMapping struct {
Outside int `json:"outside" yaml:"outside"`
Inside int `json:"inside" yaml:"inside"`
UDP bool `json:"udp" yaml:"udp"`
}
PortMapping represents microservice port mappings
func NewPortMapping ¶
func NewPortMapping(outside, inside int, udp bool) *PortMapping
NewPortMapping creates a new PortMapping
func (*PortMapping) CompareTo ¶
func (p *PortMapping) CompareTo(other *PortMapping) int
CompareTo compares two PortMappings (for sorting) Returns: negative if p < other, zero if equal, positive if p > other
func (*PortMapping) Equals ¶
func (p *PortMapping) Equals(other *PortMapping) bool
Equals checks if two PortMappings are equal
type ProcessManagerStatus ¶
type ProcessManagerStatus struct {
RunningMicroservicesCount int `json:"runningMicroservicesCount" yaml:"runningMicroservicesCount"` // Number of running microservices
MicroservicesStatus map[string]*MicroserviceStatus `json:"microservicesStatus" yaml:"microservicesStatus"` // Status of each microservice
RegistriesStatus map[int]string `json:"registriesStatus" yaml:"registriesStatus"` // Status of each registry (registry ID -> status)
// contains filtered or unexported fields
}
ProcessManagerStatus represents the Process Manager status
func NewProcessManagerStatus ¶
func NewProcessManagerStatus() *ProcessManagerStatus
NewProcessManagerStatus creates a new ProcessManagerStatus
func (*ProcessManagerStatus) ClearImagePullStatus ¶
func (p *ProcessManagerStatus) ClearImagePullStatus(microserviceUUID string) *ProcessManagerStatus
ClearImagePullStatus omits imagePullStatus. The current error text is kept.
func (*ProcessManagerStatus) ClearMicroserviceStatuses ¶
func (p *ProcessManagerStatus) ClearMicroserviceStatuses()
ClearMicroserviceStatuses clears all tracked microservice statuses and resets count.
func (*ProcessManagerStatus) GetJSONMicroservicesStatus ¶
func (p *ProcessManagerStatus) GetJSONMicroservicesStatus() string
GetJSONMicroservicesStatus returns the microservices status as a JSON string
func (*ProcessManagerStatus) GetJSONRegistriesStatus ¶
func (p *ProcessManagerStatus) GetJSONRegistriesStatus() string
GetJSONRegistriesStatus returns the registries status as a JSON string
func (*ProcessManagerStatus) GetMicroserviceStatus ¶
func (p *ProcessManagerStatus) GetMicroserviceStatus(microserviceUUID string) *MicroserviceStatus
GetMicroserviceStatus gets the status of a microservice, creating it if it doesn't exist
func (*ProcessManagerStatus) GetRegistriesStatus ¶
func (p *ProcessManagerStatus) GetRegistriesStatus() map[int]string
GetRegistriesStatus returns the registries status map
func (*ProcessManagerStatus) IncrementMicroservicesRestartCount ¶ added in v1.1.0
func (p *ProcessManagerStatus) IncrementMicroservicesRestartCount(microserviceUUID string) *ProcessManagerStatus
IncrementMicroservicesRestartCount adds one recorded crash/recreate event.
func (*ProcessManagerStatus) LookupMicroserviceStatus ¶ added in v1.1.0
func (p *ProcessManagerStatus) LookupMicroserviceStatus(microserviceUUID string) *MicroserviceStatus
LookupMicroserviceStatus returns a tracked status without creating a new entry.
func (*ProcessManagerStatus) PruneMicroserviceStatus ¶
func (p *ProcessManagerStatus) PruneMicroserviceStatus(predicate func(uuid string, status *MicroserviceStatus) bool)
PruneMicroserviceStatus removes entries matching predicate.
func (*ProcessManagerStatus) RemoveNotRunningMicroserviceStatus ¶
func (p *ProcessManagerStatus) RemoveNotRunningMicroserviceStatus()
RemoveNotRunningMicroserviceStatus removes microservices that are not running
func (*ProcessManagerStatus) ResetMicroservicesRestartCount ¶ added in v1.1.0
func (p *ProcessManagerStatus) ResetMicroservicesRestartCount(microserviceUUID string) *ProcessManagerStatus
ResetMicroservicesRestartCount zeros the in-memory restart count without touching last-error fields.
func (*ProcessManagerStatus) ResolveImagePull ¶
func (p *ProcessManagerStatus) ResolveImagePull(microserviceUUID string, pullTracked bool) *ProcessManagerStatus
ResolveImagePull clears a pull failure once the desired image is the one running. A crash error is left for the running grace period.
func (*ProcessManagerStatus) SetImagePullMiss ¶
func (p *ProcessManagerStatus) SetImagePullMiss(microserviceUUID string, state MicroserviceState, message string) *ProcessManagerStatus
SetImagePullMiss records a registry failure beside the real runtime state. restartCount is left unchanged.
func (*ProcessManagerStatus) SetMicroserviceStatusWait ¶ added in v1.1.0
func (p *ProcessManagerStatus) SetMicroserviceStatusWait(microserviceUUID, message string) *ProcessManagerStatus
SetMicroserviceStatusWait records wait text on the current error and lastError. The runtime state is left unchanged.
func (*ProcessManagerStatus) SetMicroservicesHealthStatus ¶
func (p *ProcessManagerStatus) SetMicroservicesHealthStatus(microserviceUUID string, healthStatus *string) *ProcessManagerStatus
SetMicroservicesHealthStatus sets the health status for a microservice (e.g. "healthy", "unhealthy").
func (*ProcessManagerStatus) SetMicroservicesState ¶
func (p *ProcessManagerStatus) SetMicroservicesState(microserviceUUID string, state MicroserviceState) *ProcessManagerStatus
SetMicroservicesState sets the state of a microservice and returns the status for chaining
func (*ProcessManagerStatus) SetMicroservicesStatePercentage ¶
func (p *ProcessManagerStatus) SetMicroservicesStatePercentage(microserviceUUID string, percentage float32) *ProcessManagerStatus
SetMicroservicesStatePercentage sets the state percentage of a microservice and returns the status for chaining
func (*ProcessManagerStatus) SetMicroservicesStatus ¶
func (p *ProcessManagerStatus) SetMicroservicesStatus(microserviceUUID string, status *MicroserviceStatus) *ProcessManagerStatus
SetMicroservicesStatus sets the status of a microservice and returns the status for chaining
func (*ProcessManagerStatus) SetMicroservicesStatusErrorMessage ¶
func (p *ProcessManagerStatus) SetMicroservicesStatusErrorMessage(microserviceUUID string, message string) *ProcessManagerStatus
SetMicroservicesStatusErrorMessage sets the error message for a microservice and returns the status for chaining
func (*ProcessManagerStatus) SetRegistriesStatus ¶
func (p *ProcessManagerStatus) SetRegistriesStatus(registryID int, status string) *ProcessManagerStatus
SetRegistriesStatus sets the status of a registry
func (*ProcessManagerStatus) SetRunningMicroservicesCount ¶
func (p *ProcessManagerStatus) SetRunningMicroservicesCount(count int) *ProcessManagerStatus
SetRunningMicroservicesCount sets the running microservices count and returns the status for chaining
type ProfileConfig ¶
ProfileConfig represents a single profile's configuration Uses a map to store all properties for flexible YAML mapping
func NewProfileConfig ¶
func NewProfileConfig() *ProfileConfig
NewProfileConfig creates a new ProfileConfig
func (*ProfileConfig) GetProperty ¶
func (p *ProfileConfig) GetProperty(key string) string
GetProperty gets a property value
func (*ProfileConfig) MarshalYAML ¶
func (p *ProfileConfig) MarshalYAML() (any, error)
MarshalYAML custom marshaling to output as map
func (*ProfileConfig) SetProperty ¶
func (p *ProfileConfig) SetProperty(key, value string)
SetProperty sets a property value
func (*ProfileConfig) UnmarshalYAML ¶
func (p *ProfileConfig) UnmarshalYAML(unmarshal func(any) error) error
UnmarshalYAML custom unmarshaling to handle flexible YAML structure
type RBACEnvelopeV1 ¶
type RBACEnvelopeV1 struct {
Version string `json:"version"`
RulesByGroup map[string][]RBACRuleV1 `json:"rulesByGroup"`
}
type RBACRuleV1 ¶
type RBACRuleV1 struct {
Resources []string `json:"resources"`
Verbs []string `json:"verbs"`
ResourceNames []string `json:"resourceNames,omitempty"`
}
func (RBACRuleV1) ToMap ¶
func (r RBACRuleV1) ToMap() map[string]any
type Registry ¶
type Registry struct {
ID int `json:"id" yaml:"id"`
URL string `json:"url" yaml:"url"`
IsPublic bool `json:"isPublic" yaml:"isPublic"`
UserName string `json:"userName,omitempty" yaml:"userName,omitempty"`
Password string `json:"password,omitempty" yaml:"password,omitempty"`
UserEmail string `json:"userEmail,omitempty" yaml:"userEmail,omitempty"`
Type string `json:"type,omitempty" yaml:"type,omitempty"`
CAB64 string `json:"ca,omitempty" yaml:"ca,omitempty"`
Insecure bool `json:"insecure,omitempty" yaml:"insecure,omitempty"`
}
Registry represents Docker / Hugging Face registry configuration.
func BuiltInControllerRegistries ¶ added in v1.1.0
func BuiltInControllerRegistries() []*Registry
BuiltInControllerRegistries returns controller-table defaults (docker.io and from_cache). Hugging Face Hub is local-only.
func BuiltInLocalRegistries ¶ added in v1.1.0
func BuiltInLocalRegistries() []*Registry
BuiltInLocalRegistries returns the seeded local rows: public docker.io (oci), from_cache (oci), and public Hugging Face Hub (hf).
func NewRegistry ¶
NewRegistry creates a public or credentialed OCI registry. Type is oci, extra CA is empty, and insecure is false. Use RegistryBuilder when type, ca, or insecure must be set.
func (*Registry) NormalizeDefaults ¶ added in v1.1.0
func (r *Registry) NormalizeDefaults()
NormalizeDefaults applies Registry type default (oci) and trims identity fields.
func (*Registry) NormalizedType ¶ added in v1.1.0
NormalizedType returns the effective registry type (oci when empty).
type RegistryBuilder ¶
type RegistryBuilder struct {
// contains filtered or unexported fields
}
RegistryBuilder is a builder for creating Registry instances
func NewRegistryBuilder ¶
func NewRegistryBuilder() *RegistryBuilder
NewRegistryBuilder creates a new RegistryBuilder
func (*RegistryBuilder) Build ¶
func (b *RegistryBuilder) Build() *Registry
Build creates a Registry from the builder
func (*RegistryBuilder) SetCAB64 ¶ added in v1.1.0
func (b *RegistryBuilder) SetCAB64(caB64 string) *RegistryBuilder
SetCAB64 sets the optional base64 PEM CA bundle.
func (*RegistryBuilder) SetID ¶
func (b *RegistryBuilder) SetID(id int) *RegistryBuilder
SetID sets the registry ID
func (*RegistryBuilder) SetInsecure ¶ added in v1.1.0
func (b *RegistryBuilder) SetInsecure(insecure bool) *RegistryBuilder
SetInsecure sets whether HTTP / skipped TLS verify is allowed.
func (*RegistryBuilder) SetIsPublic ¶
func (b *RegistryBuilder) SetIsPublic(isPublic bool) *RegistryBuilder
SetIsPublic sets whether the registry is public
func (*RegistryBuilder) SetPassword ¶
func (b *RegistryBuilder) SetPassword(password string) *RegistryBuilder
SetPassword sets the registry password
func (*RegistryBuilder) SetType ¶ added in v1.1.0
func (b *RegistryBuilder) SetType(registryType string) *RegistryBuilder
SetType sets the registry type (oci or hf).
func (*RegistryBuilder) SetURL ¶
func (b *RegistryBuilder) SetURL(url string) *RegistryBuilder
SetURL sets the registry URL
func (*RegistryBuilder) SetUserEmail ¶
func (b *RegistryBuilder) SetUserEmail(userEmail string) *RegistryBuilder
SetUserEmail sets the registry user email
func (*RegistryBuilder) SetUserName ¶
func (b *RegistryBuilder) SetUserName(userName string) *RegistryBuilder
SetUserName sets the registry username
type ResourceConsumptionManagerStatus ¶
type ResourceConsumptionManagerStatus struct {
AgentCPUPercent float64 `json:"agentCpuPercent" yaml:"agentCpuPercent"`
AgentMemoryMiB float64 `json:"agentMemoryMiB" yaml:"agentMemoryMiB"`
RuntimeCPUPercent float64 `json:"runtimeCpuPercent" yaml:"runtimeCpuPercent"`
RuntimeMemoryMiB float64 `json:"runtimeMemoryMiB" yaml:"runtimeMemoryMiB"`
RuntimeAvailable bool `json:"runtimeAvailable" yaml:"runtimeAvailable"`
RuntimeDegraded bool `json:"runtimeDegraded" yaml:"runtimeDegraded"`
RuntimeTracked bool `json:"runtimeTracked" yaml:"runtimeTracked"`
RuntimePIDCount int `json:"runtimePidCount" yaml:"runtimePidCount"`
EdgeletTotalCPUPercent float64 `json:"edgeletTotalCpuPercent" yaml:"edgeletTotalCpuPercent"`
EdgeletTotalMemoryMiB float64 `json:"edgeletTotalMemoryMiB" yaml:"edgeletTotalMemoryMiB"`
MemoryUsage float64 `json:"memoryUsage" yaml:"memoryUsage"` // Edgelet stack memory in MiB (alias of EdgeletTotalMemoryMiB)
DiskUsage float64 `json:"diskUsage" yaml:"diskUsage"` // Disk usage in GiB
CPUUsage float64 `json:"cpuUsage" yaml:"cpuUsage"` // Edgelet stack CPU percent (alias of EdgeletTotalCPUPercent)
MemoryViolation bool `json:"memoryViolation" yaml:"memoryViolation"` // Whether memory limit is violated
DiskViolation bool `json:"diskViolation" yaml:"diskViolation"` // Whether disk limit is violated
CPUViolation bool `json:"cpuViolation" yaml:"cpuViolation"` // Whether CPU limit is violated
AvailableMemory int64 `json:"availableMemory" yaml:"availableMemory"` // System available memory in bytes
SystemTotalMemory int64 `json:"systemTotalMemory" yaml:"systemTotalMemory"` // Host RAM capacity in bytes
SystemCpus int `json:"systemCpus" yaml:"systemCpus"` // Logical CPU count
SystemOs string `json:"systemOs" yaml:"systemOs"` // Host OS family (linux, darwin, windows, …)
SystemOsVersion string `json:"systemOsVersion" yaml:"systemOsVersion"` // Distro / release display string
SystemKernelVersion string `json:"systemKernelVersion" yaml:"systemKernelVersion"` // Linux kernel version; "" on non-linux
TotalCPU float64 `json:"totalCpu" yaml:"totalCpu"` // Host CPU usage percentage
AvailableDisk int64 `json:"availableDisk" yaml:"availableDisk"` // Free space on diskDirectory filesystem in bytes
TotalDiskSpace int64 `json:"totalDiskSpace" yaml:"totalDiskSpace"` // Total diskDirectory filesystem size in bytes
}
ResourceConsumptionManagerStatus represents the Resource Consumption Manager status. CPUUsage and MemoryUsage are edgelet stack totals (control plane + embedded runtime when available).
func NewResourceConsumptionManagerStatus ¶
func NewResourceConsumptionManagerStatus() *ResourceConsumptionManagerStatus
NewResourceConsumptionManagerStatus creates a new ResourceConsumptionManagerStatus
func (*ResourceConsumptionManagerStatus) SetAvailableDisk ¶
func (r *ResourceConsumptionManagerStatus) SetAvailableDisk(availableDisk int64) *ResourceConsumptionManagerStatus
SetAvailableDisk sets the available disk space and returns the status for chaining
func (*ResourceConsumptionManagerStatus) SetAvailableMemory ¶
func (r *ResourceConsumptionManagerStatus) SetAvailableMemory(availableMemory int64) *ResourceConsumptionManagerStatus
SetAvailableMemory sets the available memory and returns the status for chaining
func (*ResourceConsumptionManagerStatus) SetCPUUsage ¶
func (r *ResourceConsumptionManagerStatus) SetCPUUsage(cpuUsage float64) *ResourceConsumptionManagerStatus
SetCPUUsage sets the CPU usage and returns the status for chaining
func (*ResourceConsumptionManagerStatus) SetCPUViolation ¶
func (r *ResourceConsumptionManagerStatus) SetCPUViolation(violation bool) *ResourceConsumptionManagerStatus
SetCPUViolation sets the CPU violation flag and returns the status for chaining
func (*ResourceConsumptionManagerStatus) SetDiskUsage ¶
func (r *ResourceConsumptionManagerStatus) SetDiskUsage(diskUsage float64) *ResourceConsumptionManagerStatus
SetDiskUsage sets the disk usage and returns the status for chaining
func (*ResourceConsumptionManagerStatus) SetDiskViolation ¶
func (r *ResourceConsumptionManagerStatus) SetDiskViolation(violation bool) *ResourceConsumptionManagerStatus
SetDiskViolation sets the disk violation flag and returns the status for chaining
func (*ResourceConsumptionManagerStatus) SetMemoryUsage ¶
func (r *ResourceConsumptionManagerStatus) SetMemoryUsage(memoryUsage float64) *ResourceConsumptionManagerStatus
SetMemoryUsage sets the memory usage and returns the status for chaining
func (*ResourceConsumptionManagerStatus) SetMemoryViolation ¶
func (r *ResourceConsumptionManagerStatus) SetMemoryViolation(violation bool) *ResourceConsumptionManagerStatus
SetMemoryViolation sets the memory violation flag and returns the status for chaining
func (*ResourceConsumptionManagerStatus) SetTotalCPU ¶
func (r *ResourceConsumptionManagerStatus) SetTotalCPU(totalCPU float64) *ResourceConsumptionManagerStatus
SetTotalCPU sets the total CPU usage and returns the status for chaining
func (*ResourceConsumptionManagerStatus) SetTotalDiskSpace ¶
func (r *ResourceConsumptionManagerStatus) SetTotalDiskSpace(totalDiskSpace int64) *ResourceConsumptionManagerStatus
SetTotalDiskSpace sets the total disk space and returns the status for chaining
type Route ¶
type Route struct {
Receivers []string `json:"receivers" yaml:"receivers"`
}
Route represents microservice routings
func (*Route) SetReceivers ¶
SetReceivers sets the receivers list and sorts it
type RuntimeClassStatus ¶ added in v1.1.0
type RuntimeClassStatus struct {
Name string `json:"name"`
Handler string `json:"handler"`
Source string `json:"source"`
}
RuntimeClassStatus is one applied RuntimeClass on fog and local status.
func (RuntimeClassStatus) Display ¶ added in v1.1.0
func (r RuntimeClassStatus) Display() string
Display renders the class as "name (handler, source)" for human status output.
type SSHProxyManagerStatus ¶
type SSHProxyManagerStatus struct {
ProxyStatus map[string]any `json:"proxyStatus" yaml:"proxyStatus"` // Proxy status information
}
SSHProxyManagerStatus represents the SSH Proxy Manager status
func NewSSHProxyManagerStatus ¶
func NewSSHProxyManagerStatus() *SSHProxyManagerStatus
NewSSHProxyManagerStatus creates a new SSHProxyManagerStatus
func (*SSHProxyManagerStatus) GetJSONProxyStatus ¶
func (s *SSHProxyManagerStatus) GetJSONProxyStatus() string
GetJSONProxyStatus returns the proxy status as a JSON string
func (*SSHProxyManagerStatus) SetConnectionStatus ¶
func (s *SSHProxyManagerStatus) SetConnectionStatus(status string) *SSHProxyManagerStatus
SetConnectionStatus sets the connection status
func (*SSHProxyManagerStatus) SetErrorMessage ¶
func (s *SSHProxyManagerStatus) SetErrorMessage(errMsg string) *SSHProxyManagerStatus
SetErrorMessage sets the error message
func (*SSHProxyManagerStatus) SetProxyConfig ¶
func (s *SSHProxyManagerStatus) SetProxyConfig(username, host string, remotePort, localPort int) *SSHProxyManagerStatus
SetProxyConfig sets the proxy configuration
func (*SSHProxyManagerStatus) SetProxyStatus ¶
func (s *SSHProxyManagerStatus) SetProxyStatus(status map[string]any) *SSHProxyManagerStatus
SetProxyStatus sets the proxy status and returns the status for chaining
type ServiceAccount ¶
type ServiceAccount struct {
Name string `json:"name" yaml:"name"`
RoleRef ServiceAccountRoleRef `json:"roleRef" yaml:"roleRef"`
Rules []ServiceAccountRule `json:"rules" yaml:"rules"`
}
func (*ServiceAccount) CanonicalRBACV1 ¶
func (sa *ServiceAccount) CanonicalRBACV1() RBACEnvelopeV1
type ServiceAccountRoleRef ¶
type ServiceAccountRule ¶
type ServiceAccountRule struct {
APIGroups []string `json:"apiGroups" yaml:"apiGroups"`
Resources []string `json:"resources" yaml:"resources"`
Verbs []string `json:"verbs" yaml:"verbs"`
ResourceNames []string `json:"resourceNames,omitempty" yaml:"resourceNames,omitempty"`
}
func (ServiceAccountRule) ToRBACRuleV1 ¶
func (r ServiceAccountRule) ToRBACRuleV1() RBACRuleV1
type ServiceAccountToken ¶
type ServiceAccountToken struct {
ID string
TokenUse string
PrincipalType string
Subject string
MicroserviceUUID string
ApplicationName string
ServiceAccountName string
RoleRefKind string
RoleRefName string
RBACVersion string
RulesByGroupJSON string
ClaimsJSON string
Issuer string
Audience string
Alg string
JTI string
TokenSHA256 string
IssuedAt int64
NotBefore int64
ExpiresAt int64
RevokedAt *int64
RotatedFromJTI string
}
ServiceAccountToken represents persisted token metadata for EdgeletAPI v3.
type StatusReporterStatus ¶
type StatusReporterStatus struct {
SystemTime int64 `json:"systemTime" yaml:"systemTime"`
LastUpdate int64 `json:"lastUpdate" yaml:"lastUpdate"`
}
StatusReporterStatus represents the Status Reporter status
func NewStatusReporterStatus ¶
func NewStatusReporterStatus() *StatusReporterStatus
NewStatusReporterStatus creates a new StatusReporterStatus with current time
func NewStatusReporterStatusWithTimes ¶
func NewStatusReporterStatusWithTimes(systemTime, lastUpdate int64) *StatusReporterStatus
NewStatusReporterStatusWithTimes creates a new StatusReporterStatus with specified times
func (*StatusReporterStatus) SetLastUpdate ¶
func (s *StatusReporterStatus) SetLastUpdate(lastUpdate int64) *StatusReporterStatus
SetLastUpdate sets the last update time and returns the status for chaining
func (*StatusReporterStatus) SetSystemTime ¶
func (s *StatusReporterStatus) SetSystemTime(systemTime int64) *StatusReporterStatus
SetSystemTime sets the system time and returns the status for chaining
type SupervisorStatus ¶
type SupervisorStatus struct {
DaemonStatus ModuleStatus `json:"daemonStatus" yaml:"daemonStatus"` // Daemon status
ModulesStatus []ModuleStatus `json:"modulesStatus" yaml:"modulesStatus"` // Status of each module
DaemonLastStart int64 `json:"daemonLastStart" yaml:"daemonLastStart"` // Timestamp of last start
OperationDuration int64 `json:"operationDuration" yaml:"operationDuration"` // Operating duration in milliseconds
WarningMessage string `json:"warningMessage" yaml:"warningMessage"` // Warning message
}
SupervisorStatus represents the Supervisor status
func NewSupervisorStatus ¶
func NewSupervisorStatus(numModules int) *SupervisorStatus
NewSupervisorStatus creates a new SupervisorStatus with default values
func (*SupervisorStatus) GetModuleStatus ¶
func (s *SupervisorStatus) GetModuleStatus(moduleIndex int) ModuleStatus
GetModuleStatus gets the status of a module
func (*SupervisorStatus) GetOperationDuration ¶
func (s *SupervisorStatus) GetOperationDuration() int64
GetOperationDuration returns the operation duration (current time - last start)
func (*SupervisorStatus) SetDaemonLastStart ¶
func (s *SupervisorStatus) SetDaemonLastStart(timestamp int64) *SupervisorStatus
SetDaemonLastStart sets the daemon last start time and returns the status for chaining
func (*SupervisorStatus) SetDaemonStatus ¶
func (s *SupervisorStatus) SetDaemonStatus(status ModuleStatus) *SupervisorStatus
SetDaemonStatus sets the daemon status and returns the status for chaining
func (*SupervisorStatus) SetModuleStatus ¶
func (s *SupervisorStatus) SetModuleStatus(moduleIndex int, status ModuleStatus) *SupervisorStatus
SetModuleStatus sets the status of a module and returns the status for chaining
func (*SupervisorStatus) SetOperationDuration ¶
func (s *SupervisorStatus) SetOperationDuration(duration int64) *SupervisorStatus
SetOperationDuration sets the operation duration and returns the status for chaining
func (*SupervisorStatus) SetWarningMessage ¶
func (s *SupervisorStatus) SetWarningMessage(message string) *SupervisorStatus
SetWarningMessage sets the warning message and returns the status for chaining
type TmpfsMount ¶ added in v1.1.0
type TmpfsMount struct {
ContainerPath string `json:"containerPath" yaml:"containerPath"`
Size *int64 `json:"size,omitempty" yaml:"size,omitempty"`
Mode string `json:"mode,omitempty" yaml:"mode,omitempty"`
}
TmpfsMount is an in-memory filesystem mount inside the container. Size is MiB.
type Ulimit ¶ added in v1.1.0
Ulimit is a soft/hard resource limit. -1 means unlimited.
func (*Ulimit) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON rejects scalar ulimit values; only {soft,hard} is accepted.
type ValidationError ¶
ValidationError represents a validation error with field information
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
type VolumeMapping ¶
type VolumeMapping struct {
HostDestination string `json:"hostDestination" yaml:"hostDestination"`
ContainerDestination string `json:"containerDestination" yaml:"containerDestination"`
AccessMode string `json:"accessMode" yaml:"accessMode"`
Type VolumeMappingType `json:"type" yaml:"type"`
Scope string `json:"scope,omitempty" yaml:"scope,omitempty"`
}
VolumeMapping represents microservice volume mappings for Docker run options
func NewVolumeMapping ¶
func NewVolumeMapping(hostDestination, containerDestination, accessMode string, volumeType VolumeMappingType) *VolumeMapping
NewVolumeMapping creates a new VolumeMapping
func (*VolumeMapping) EffectiveVolumeScope ¶ added in v1.1.0
func (v *VolumeMapping) EffectiveVolumeScope() string
EffectiveVolumeScope returns the ledger scope for this mapping. Scope is meaningful only for VOLUME; BIND and VOLUME_MOUNT are always private.
func (*VolumeMapping) Equals ¶
func (v *VolumeMapping) Equals(other *VolumeMapping) bool
Equals checks if two VolumeMappings are equal
type VolumeMappingType ¶
type VolumeMappingType string
VolumeMappingType represents the type of volume mapping
const ( VolumeMappingTypeVolume VolumeMappingType = "VOLUME" VolumeMappingTypeBind VolumeMappingType = "BIND" VolumeMappingTypeVolumeMount VolumeMappingType = "VOLUME_MOUNT" )
type VolumeMountManagerStatus ¶
type VolumeMountManagerStatus struct {
ActiveMounts int64 `json:"activeMounts" yaml:"activeMounts"` // Number of active volume mounts
LastUpdate int64 `json:"lastUpdate" yaml:"lastUpdate"` // Timestamp of last update
}
VolumeMountManagerStatus represents the Volume Mount Manager status
func NewVolumeMountManagerStatus ¶
func NewVolumeMountManagerStatus() *VolumeMountManagerStatus
NewVolumeMountManagerStatus creates a new VolumeMountManagerStatus
func (*VolumeMountManagerStatus) SetActiveMounts ¶
func (v *VolumeMountManagerStatus) SetActiveMounts(count int64) *VolumeMountManagerStatus
SetActiveMounts sets the active mounts count and returns the status for chaining
func (*VolumeMountManagerStatus) SetLastUpdate ¶
func (v *VolumeMountManagerStatus) SetLastUpdate(timestamp int64) *VolumeMountManagerStatus
SetLastUpdate sets the last update time and returns the status for chaining
type YamlConfig ¶
type YamlConfig struct {
CurrentProfile string `json:"currentProfile" yaml:"currentProfile"`
Profiles map[string]*ProfileConfig `json:"profiles" yaml:"profiles"`
}
YamlConfig represents the root YAML configuration structure
func (*YamlConfig) GetProfile ¶
func (y *YamlConfig) GetProfile(name string) *ProfileConfig
GetProfile gets a profile by name
Source Files
¶
- catalog_container_validate.go
- catalog_gate.go
- config.go
- container_spec.go
- control_plane_deployment.go
- control_plane_manifest.go
- control_plane_manifest_mask.go
- controller_knowledge.go
- controller_model.go
- controller_runtimeclass.go
- edgelet_api_status.go
- env_var.go
- exec_message.go
- field_agent_status.go
- healthcheck.go
- knowledge_catalog.go
- knowledge_catalog_gate.go
- local_deploy_manifest.go
- local_deployed_microservice.go
- local_knowledge.go
- local_knowledge_manifest.go
- local_manifest_runtime.go
- local_model.go
- local_model_manifest.go
- local_registry_manifest.go
- local_runtimeclass.go
- local_runtimeclass_manifest.go
- log_message.go
- microservice.go
- microservice_spec_json.go
- microservice_state.go
- microservice_status.go
- model_catalog.go
- pod_id.go
- port_mapping.go
- process_manager_status.go
- registry.go
- resource_consumption_manager_status.go
- route.go
- runtimeclass_inuse.go
- service_account.go
- service_account_token.go
- ssh_proxy_manager_status.go
- status_reporter_status.go
- supervisor_status.go
- supplemental_groups.go
- validation.go
- volume_mapping.go
- volume_mapping_type.go
- volume_mount_manager_status.go