Documentation
¶
Index ¶
- Constants
- Variables
- func CanonicalizeVerbs(verbs []string) []string
- func MaskedControlPlaneManifestYAML(manifest string) (string, error)
- func RuntimeClassBinaryPathForHandler(handler string) string
- func StatControlPlaneTLSDir(hostDir string) (os.FileInfo, error)
- func StatControlPlaneTLSFile(hostDir, basename string) (os.FileInfo, error)
- func ValidateControlPlaneTLSPath(path string) (string, error)
- func ValidateEnvVar(e *EnvVar) error
- func ValidateExecMessage(em *ExecMessage) error
- func ValidateFieldAgentStatus(fa *FieldAgentStatus) error
- func ValidateLogMessage(lm *LogMessage) error
- func ValidateMicroserviceStatus(ms *MicroserviceStatus) 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 ValidateYamlConfig(yc *YamlConfig) 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 ControllerStatus
- type EdgeletAPIStatus
- type EnvVar
- type ExecMessage
- type FieldAgentStatus
- type Healthcheck
- type LocalDeployManifest
- type LocalDeployedMicroservice
- type LocalRegistryManifest
- 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) SetIsUpdating(updating bool)
- func (m *Microservice) SetMemoryLimitMB(memoryLimitMB *int64)
- func (m *Microservice) Validate() error
- type MicroserviceState
- type MicroserviceStatus
- func (m *MicroserviceStatus) AddExecSessionID(execSessionID 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 ModuleStatus
- type PortMapping
- type 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) PruneMicroserviceStatus(predicate func(uuid string, status *MicroserviceStatus) bool)
- func (p *ProcessManagerStatus) RemoveNotRunningMicroserviceStatus()
- 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) SetID(id int) *RegistryBuilder
- func (b *RegistryBuilder) SetIsPublic(isPublic bool) *RegistryBuilder
- func (b *RegistryBuilder) SetPassword(password 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 ResourceManagerStatus
- type Route
- 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 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 ( LogMessageTypeLogLine byte = 6 LogMessageTypeLogStart byte = 7 LogMessageTypeLogStop byte = 8 LogMessageTypeLogError byte = 9 )
LogMessageType represents the type of log message
const ControlPlaneDefaultNamespace = "default"
Variables ¶
var DeleteLock = &sync.Mutex{}
DeleteLock is a global lock for microservice deletion operations
Functions ¶
func CanonicalizeVerbs ¶
func MaskedControlPlaneManifestYAML ¶
MaskedControlPlaneManifestYAML returns manifest YAML with secrets redacted.
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 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 ValidateLogMessage ¶
func ValidateLogMessage(lm *LogMessage) error
ValidateLogMessage validates a LogMessage
func ValidateMicroserviceStatus ¶
func ValidateMicroserviceStatus(ms *MicroserviceStatus) error
ValidateMicroserviceStatus validates a MicroserviceStatus
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 ValidateYamlConfig ¶
func ValidateYamlConfig(yc *YamlConfig) error
ValidateYamlConfig validates a YamlConfig
Types ¶
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"`
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 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 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 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 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"`
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"`
Platform string `yaml:"platform,omitempty" json:"platform,omitempty"`
Runtime string `yaml:"runtime,omitempty" json:"runtime,omitempty"`
CDIDevices []string `yaml:"cdiDevices,omitempty" json:"cdiDevices,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"`
} `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"`
Commands []string `yaml:"commands,omitempty" json:"commands,omitempty"`
CPUSetCpus string `yaml:"cpuSetCpus,omitempty" json:"cpuSetCpus,omitempty"`
MemoryLimit int64 `yaml:"memoryLimit,omitempty" json:"memoryLimit,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
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) NormalizeDefaults ¶
func (m *LocalDeployedMicroservice) NormalizeDefaults()
NormalizeDefaults ensures lifecycle defaults are present for local records.
type LocalRegistryManifest ¶
type LocalRegistryManifest struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
Spec struct {
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"`
} `yaml:"spec" json:"spec"`
}
LocalRegistryManifest represents local registry deployment YAML.
func (*LocalRegistryManifest) Validate ¶
func (m *LocalRegistryManifest) Validate() error
type LocalRuntimeClass ¶
type LocalRuntimeClass struct {
Name string `json:"name"`
Handler string `json:"handler"`
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"`
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"`
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"`
MemoryLimit *int64 `json:"memoryLimit,omitempty" yaml:"memoryLimit,omitempty"` // in bytes
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 MB
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 MB to bytes
func (*Microservice) Validate ¶
func (m *Microservice) Validate() error
Validate validates the microservice configuration
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"`
Percentage float32 `json:"percentage" yaml:"percentage"`
ErrorMessage *string `json:"errorMessage,omitempty" yaml:"errorMessage,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) 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 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) 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) 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) 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"`
}
Registry represents Docker registry configuration
func NewRegistry ¶
NewRegistry creates a new Registry
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) SetID ¶
func (b *RegistryBuilder) SetID(id int) *RegistryBuilder
SetID sets the registry ID
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) 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
TotalCPU float64 `json:"totalCpu" yaml:"totalCpu"` // Host CPU usage percentage
AvailableDisk int64 `json:"availableDisk" yaml:"availableDisk"` // System available disk space in bytes
TotalDiskSpace int64 `json:"totalDiskSpace" yaml:"totalDiskSpace"` // Total system disk space 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 ResourceManagerStatus ¶
type ResourceManagerStatus struct {
HWInfo string `json:"hwInfo" yaml:"hwInfo"` // Hardware information from HAL
USBConnectionsInfo string `json:"usbConnectionsInfo" yaml:"usbConnectionsInfo"` // USB connections information from HAL
}
ResourceManagerStatus represents the Resource Manager status
func NewResourceManagerStatus ¶
func NewResourceManagerStatus() *ResourceManagerStatus
NewResourceManagerStatus creates a new ResourceManagerStatus
func (*ResourceManagerStatus) SetHWInfo ¶
func (r *ResourceManagerStatus) SetHWInfo(hwInfo string) *ResourceManagerStatus
SetHWInfo sets the hardware info and returns the status for chaining
func (*ResourceManagerStatus) SetUSBConnectionsInfo ¶
func (r *ResourceManagerStatus) SetUSBConnectionsInfo(usbInfo string) *ResourceManagerStatus
SetUSBConnectionsInfo sets the USB connections info 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 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 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"`
}
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) 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
¶
- config.go
- control_plane_deployment.go
- control_plane_manifest.go
- control_plane_manifest_mask.go
- edgelet_api_status.go
- env_var.go
- exec_message.go
- field_agent_status.go
- healthcheck.go
- local_deploy_manifest.go
- local_deployed_microservice.go
- local_manifest_runtime.go
- local_registry_manifest.go
- local_runtimeclass.go
- local_runtimeclass_manifest.go
- log_message.go
- microservice.go
- microservice_state.go
- microservice_status.go
- port_mapping.go
- process_manager_status.go
- registry.go
- resource_consumption_manager_status.go
- resource_manager_status.go
- route.go
- service_account.go
- service_account_token.go
- ssh_proxy_manager_status.go
- status_reporter_status.go
- supervisor_status.go
- validation.go
- volume_mapping.go
- volume_mapping_type.go
- volume_mount_manager_status.go