Documentation
¶
Index ¶
- Constants
- func HealthLiveHandler(w http.ResponseWriter, _ *http.Request)
- func HealthReadyHandler(w http.ResponseWriter, _ *http.Request)
- func MetricsHandler(w http.ResponseWriter, _ *http.Request)
- func MetricsStartTime() time.Time
- func NotImplemented(w http.ResponseWriter, _ *http.Request)
- func SetEdgeletAPIStartupState(phase, reason string)
- type AuthHandler
- type AuthWhoAmIResponse
- type EdgeletAPIHandler
- func (h *EdgeletAPIHandler) HandleAuthTokens(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleAuthTokensRevoke(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleConfig(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployControlPlaneApply(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployControlPlaneApplyStatus(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployControlPlaneValidate(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployKnowledgeApply(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployKnowledgeValidate(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployMicroservices(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployMicroservicesApply(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployMicroservicesApplyStatus(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployMicroservicesValidate(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployModelsApply(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployModelsValidate(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployRegistries(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployRegistriesApply(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployRegistriesValidate(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployRuntimeClasses(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployRuntimeClassesApply(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployRuntimeClassesApplyStatus(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployRuntimeClassesDeleteStatus(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleDeployRuntimeClassesValidate(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleImageLoad(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleImageLoadStatus(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleImagePrune(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleImagePull(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleImagePullStatus(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleImageRemove(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleImages(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleKnowledge(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleKnowledgePrune(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleKnowledgePull(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleKnowledgePullStatus(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleMicroserviceConfigSelf(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleMicroservices(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleModelPrune(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleModelPull(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleModelPullStatus(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleModels(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleRuntimeDrain(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleSystemConfigSwitch(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleSystemControlPlane(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleSystemControlPlaneRestart(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleSystemControllerCert(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleSystemControllerStatus(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleSystemGPS(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleSystemLogs(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleSystemProvision(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleSystemPrune(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleSystemReload(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleVolumePrune(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleVolumeShared(w http.ResponseWriter, r *http.Request)
- func (h *EdgeletAPIHandler) HandleVolumes(w http.ResponseWriter, r *http.Request)
- type InfoHandler
- type StatusHandler
- type VersionHandler
Constants ¶
const ( // Stable v3 error code taxonomy. ErrCodeInvalidArgument = "INVALID_ARGUMENT" ErrCodeForbidden = "FORBIDDEN" ErrCodeNotFound = "NOT_FOUND" ErrCodeConflict = "CONFLICT" ErrCodeApplyInProgress = "APPLY_IN_PROGRESS" ErrCodeNotImplemented = "NOT_IMPLEMENTED" ErrCodeInternal = "INTERNAL" ErrCodeMethodNotAllowed = "METHOD_NOT_ALLOWED" ErrCodeExecStartTimeout = "EXEC_START_TIMEOUT" )
const ( EdgeletAPIStartupInitializing = "initializing" EdgeletAPIStartupListening = "listening" EdgeletAPIStartupFailed = "failed" )
Variables ¶
This section is empty.
Functions ¶
func HealthLiveHandler ¶
func HealthLiveHandler(w http.ResponseWriter, _ *http.Request)
HealthLiveHandler handles /health/live — liveness probe. Returns 200 if the process is running and the HTTP server can respond. Used by orchestrators (Kubernetes, systemd) to determine if the process should be restarted.
func HealthReadyHandler ¶
func HealthReadyHandler(w http.ResponseWriter, _ *http.Request)
HealthReadyHandler handles /health/ready — readiness probe. Returns 200 when the local API is listening and the supervisor has finished engine wiring. Controller connectivity is reported separately in status; it does not gate local readiness.
func MetricsHandler ¶
func MetricsHandler(w http.ResponseWriter, _ *http.Request)
MetricsHandler handles /metrics — Prometheus-format metrics. Exposes basic agent metrics for enterprise observability.
func MetricsStartTime ¶
MetricsStartTime returns agent start time for metrics.
func NotImplemented ¶
func NotImplemented(w http.ResponseWriter, _ *http.Request)
NotImplemented returns a generic 501 response for staged endpoints.
func SetEdgeletAPIStartupState ¶
func SetEdgeletAPIStartupState(phase, reason string)
SetEdgeletAPIStartupState updates the listener startup phase for health checks.
Types ¶
type AuthHandler ¶
type AuthHandler struct{}
AuthHandler handles auth-related EdgeletAPI requests.
func (*AuthHandler) HandleWhoAmI ¶
func (h *AuthHandler) HandleWhoAmI(w http.ResponseWriter, r *http.Request)
HandleWhoAmI handles GET /v1/auth/whoami.
type AuthWhoAmIResponse ¶
type AuthWhoAmIResponse struct {
Subject string `json:"subject"`
TokenType string `json:"tokenType"`
Issuer string `json:"issuer"`
Audience []string `json:"audience"`
JTI string `json:"jti,omitempty"`
ExpiresAt int64 `json:"expiresAt,omitempty"`
Claims map[string]any `json:"claims"`
}
AuthWhoAmIResponse returns caller identity details.
type EdgeletAPIHandler ¶
type EdgeletAPIHandler struct {
// contains filtered or unexported fields
}
EdgeletAPIHandler handles Edgelet API v1 endpoint groups.
func NewEdgeletAPIHandler ¶
func NewEdgeletAPIHandler() *EdgeletAPIHandler
NewEdgeletAPIHandler creates a new Edgelet API handler.
func (*EdgeletAPIHandler) HandleAuthTokens ¶
func (h *EdgeletAPIHandler) HandleAuthTokens(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleAuthTokensRevoke ¶
func (h *EdgeletAPIHandler) HandleAuthTokensRevoke(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleConfig ¶
func (h *EdgeletAPIHandler) HandleConfig(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployControlPlaneApply ¶
func (h *EdgeletAPIHandler) HandleDeployControlPlaneApply(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployControlPlaneApplyStatus ¶
func (h *EdgeletAPIHandler) HandleDeployControlPlaneApplyStatus(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployControlPlaneValidate ¶
func (h *EdgeletAPIHandler) HandleDeployControlPlaneValidate(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployKnowledgeApply ¶ added in v1.1.0
func (h *EdgeletAPIHandler) HandleDeployKnowledgeApply(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployKnowledgeValidate ¶ added in v1.1.0
func (h *EdgeletAPIHandler) HandleDeployKnowledgeValidate(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployMicroservices ¶
func (h *EdgeletAPIHandler) HandleDeployMicroservices(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployMicroservicesApply ¶
func (h *EdgeletAPIHandler) HandleDeployMicroservicesApply(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployMicroservicesApplyStatus ¶
func (h *EdgeletAPIHandler) HandleDeployMicroservicesApplyStatus(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployMicroservicesValidate ¶
func (h *EdgeletAPIHandler) HandleDeployMicroservicesValidate(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployModelsApply ¶ added in v1.1.0
func (h *EdgeletAPIHandler) HandleDeployModelsApply(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployModelsValidate ¶ added in v1.1.0
func (h *EdgeletAPIHandler) HandleDeployModelsValidate(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployRegistries ¶
func (h *EdgeletAPIHandler) HandleDeployRegistries(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployRegistriesApply ¶
func (h *EdgeletAPIHandler) HandleDeployRegistriesApply(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployRegistriesValidate ¶
func (h *EdgeletAPIHandler) HandleDeployRegistriesValidate(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployRuntimeClasses ¶
func (h *EdgeletAPIHandler) HandleDeployRuntimeClasses(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployRuntimeClassesApply ¶
func (h *EdgeletAPIHandler) HandleDeployRuntimeClassesApply(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployRuntimeClassesApplyStatus ¶
func (h *EdgeletAPIHandler) HandleDeployRuntimeClassesApplyStatus(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployRuntimeClassesDeleteStatus ¶
func (h *EdgeletAPIHandler) HandleDeployRuntimeClassesDeleteStatus(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleDeployRuntimeClassesValidate ¶
func (h *EdgeletAPIHandler) HandleDeployRuntimeClassesValidate(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleImageLoad ¶
func (h *EdgeletAPIHandler) HandleImageLoad(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleImageLoadStatus ¶
func (h *EdgeletAPIHandler) HandleImageLoadStatus(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleImagePrune ¶
func (h *EdgeletAPIHandler) HandleImagePrune(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleImagePull ¶
func (h *EdgeletAPIHandler) HandleImagePull(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleImagePullStatus ¶
func (h *EdgeletAPIHandler) HandleImagePullStatus(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleImageRemove ¶
func (h *EdgeletAPIHandler) HandleImageRemove(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleImages ¶
func (h *EdgeletAPIHandler) HandleImages(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleKnowledge ¶ added in v1.1.0
func (h *EdgeletAPIHandler) HandleKnowledge(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleKnowledgePrune ¶ added in v1.1.0
func (h *EdgeletAPIHandler) HandleKnowledgePrune(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleKnowledgePull ¶ added in v1.1.0
func (h *EdgeletAPIHandler) HandleKnowledgePull(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleKnowledgePullStatus ¶ added in v1.1.0
func (h *EdgeletAPIHandler) HandleKnowledgePullStatus(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleMicroserviceConfigSelf ¶
func (h *EdgeletAPIHandler) HandleMicroserviceConfigSelf(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleMicroservices ¶
func (h *EdgeletAPIHandler) HandleMicroservices(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleModelPrune ¶ added in v1.1.0
func (h *EdgeletAPIHandler) HandleModelPrune(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleModelPull ¶ added in v1.1.0
func (h *EdgeletAPIHandler) HandleModelPull(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleModelPullStatus ¶ added in v1.1.0
func (h *EdgeletAPIHandler) HandleModelPullStatus(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleModels ¶ added in v1.1.0
func (h *EdgeletAPIHandler) HandleModels(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleRuntimeDrain ¶ added in v1.0.1
func (h *EdgeletAPIHandler) HandleRuntimeDrain(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleSystemConfigSwitch ¶
func (h *EdgeletAPIHandler) HandleSystemConfigSwitch(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleSystemControlPlane ¶
func (h *EdgeletAPIHandler) HandleSystemControlPlane(w http.ResponseWriter, r *http.Request)
HandleSystemControlPlane routes GET/DELETE /v1/system/controlplane and GET manifest.
func (*EdgeletAPIHandler) HandleSystemControlPlaneRestart ¶
func (h *EdgeletAPIHandler) HandleSystemControlPlaneRestart(w http.ResponseWriter, r *http.Request)
HandleSystemControlPlaneRestart handles POST /v1/system/controlplane/restart.
func (*EdgeletAPIHandler) HandleSystemControllerCert ¶
func (h *EdgeletAPIHandler) HandleSystemControllerCert(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleSystemControllerStatus ¶
func (h *EdgeletAPIHandler) HandleSystemControllerStatus(w http.ResponseWriter, r *http.Request)
HandleSystemControllerStatus is the GET /v1/system/controller status alias.
func (*EdgeletAPIHandler) HandleSystemGPS ¶
func (h *EdgeletAPIHandler) HandleSystemGPS(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleSystemLogs ¶
func (h *EdgeletAPIHandler) HandleSystemLogs(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleSystemProvision ¶
func (h *EdgeletAPIHandler) HandleSystemProvision(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleSystemPrune ¶
func (h *EdgeletAPIHandler) HandleSystemPrune(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleSystemReload ¶
func (h *EdgeletAPIHandler) HandleSystemReload(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleVolumePrune ¶ added in v1.1.0
func (h *EdgeletAPIHandler) HandleVolumePrune(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleVolumeShared ¶ added in v1.1.0
func (h *EdgeletAPIHandler) HandleVolumeShared(w http.ResponseWriter, r *http.Request)
func (*EdgeletAPIHandler) HandleVolumes ¶ added in v1.1.0
func (h *EdgeletAPIHandler) HandleVolumes(w http.ResponseWriter, r *http.Request)
type InfoHandler ¶
type InfoHandler struct {
}
InfoHandler handles info API requests
func (*InfoHandler) HandleInfo ¶
func (h *InfoHandler) HandleInfo(w http.ResponseWriter, r *http.Request)
HandleInfo handles GET /v1/system/info
type StatusHandler ¶
type StatusHandler struct {
}
StatusHandler handles status API requests
func (*StatusHandler) HandleStatus ¶
func (h *StatusHandler) HandleStatus(w http.ResponseWriter, r *http.Request)
HandleStatus handles GET /v1/system/status
type VersionHandler ¶
type VersionHandler struct {
}
VersionHandler handles version API requests
func (*VersionHandler) HandleVersion ¶
func (h *VersionHandler) HandleVersion(w http.ResponseWriter, r *http.Request)
HandleVersion handles GET /v1/system/version.