Documentation
¶
Index ¶
- Variables
- func CleanupRuntimeArtifacts() error
- func CleanupStaleRuntimeTasks() error
- func MaybeRunChildProcess(args []string) (bool, error)
- type ErrContainerdReconfigureOperation
- type ErrRuntimeHandlerUnavailable
- type RuntimeCatalogEntry
- type RuntimeFamily
- type Service
- func (s *Service) IsAttachOnly() bool
- func (s *Service) IsHealthy() bool
- func (s *Service) Ready() <-chan struct{}
- func (s *Service) Reap() error
- func (s *Service) Reconfigure() error
- func (s *Service) Run() error
- func (s *Service) SetUnexpectedExitHandler(handler func(error))
- func (s *Service) Start() error
- func (s *Service) Stop()
- func (s *Service) StopForce() error
- func (s *Service) StopGraceful() error
- func (s *Service) WaitReady(timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrContainerdSpawnFailure = errors.New("containerd spawn failure") ErrContainerdReadiness = errors.New("containerd readiness failure") ErrContainerdExitedEarly = errors.New("containerd exited before ready") ErrContainerdStopTimeout = errors.New("containerd stop timeout") ErrContainerdUnexpectedExit = errors.New("containerd unexpected exit") ErrContainerdReconfigure = errors.New("containerd reconfigure failure") )
Functions ¶
func CleanupRuntimeArtifacts ¶
func CleanupRuntimeArtifacts() error
CleanupRuntimeArtifacts removes stale runtime artifacts used by embedded containerd. It intentionally preserves persistent image/layer data under EdgeletContainerdRootDir.
func CleanupStaleRuntimeTasks ¶
func CleanupStaleRuntimeTasks() error
CleanupStaleRuntimeTasks removes orphaned runtime task directories under EdgeletContainerdStateDir. Preserves EdgeletContainerdRootDir (images/layers).
func MaybeRunChildProcess ¶
MaybeRunChildProcess runs containerd in child mode when the daemon is invoked with the dedicated internal child argument.
Types ¶
type ErrContainerdReconfigureOperation ¶
func (*ErrContainerdReconfigureOperation) Details ¶
func (e *ErrContainerdReconfigureOperation) Details() map[string]any
func (*ErrContainerdReconfigureOperation) Error ¶
func (e *ErrContainerdReconfigureOperation) Error() string
func (*ErrContainerdReconfigureOperation) Unwrap ¶
func (e *ErrContainerdReconfigureOperation) Unwrap() error
type ErrRuntimeHandlerUnavailable ¶
type ErrRuntimeHandlerUnavailable struct {
}
ErrRuntimeHandlerUnavailable indicates a requested handler is missing or not eligible.
func (*ErrRuntimeHandlerUnavailable) Error ¶
func (e *ErrRuntimeHandlerUnavailable) Error() string
func (*ErrRuntimeHandlerUnavailable) Unwrap ¶
func (e *ErrRuntimeHandlerUnavailable) Unwrap() error
type RuntimeCatalogEntry ¶
type RuntimeCatalogEntry struct {
Handler string
Binary string
Path string
RuntimeType string
Family RuntimeFamily
}
RuntimeCatalogEntry is one runtime handler detection result.
func BuildRuntimeCatalog ¶
func BuildRuntimeCatalog() []RuntimeCatalogEntry
BuildRuntimeCatalog discovers supported runtimes from PATH. Only discovered handlers are returned.
func ValidateRuntimeHandlerEligibility ¶
func ValidateRuntimeHandlerEligibility(handler string, catalog []RuntimeCatalogEntry) (RuntimeCatalogEntry, error)
ValidateRuntimeHandlerEligibility returns a runtime entry only when handler exists in catalog and is eligible.
type RuntimeFamily ¶
type RuntimeFamily string
const ( RuntimeFamilyRunc RuntimeFamily = "runc" RuntimeFamilyShim RuntimeFamily = "shim" )
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manages the embedded containerd child-process lifecycle.
func NewAttachedService ¶
func NewAttachedService() *Service
NewAttachedService monitors an externally managed containerd (Plan 11 data-plane unit).
func NewService ¶
func NewService() *Service
NewService creates an uninitialized containerd service.
func (*Service) IsAttachOnly ¶
IsAttachOnly reports whether this service only monitors an external containerd process.
func (*Service) Ready ¶
func (s *Service) Ready() <-chan struct{}
Ready returns a channel that closes when containerd is ready to accept requests.
func (*Service) Reconfigure ¶
Reconfigure rewrites containerd config and performs a controlled restart.
func (*Service) SetUnexpectedExitHandler ¶
func (*Service) Stop ¶
func (s *Service) Stop()
Stop keeps backward-compatible behavior while enforcing escalation.
func (*Service) StopGraceful ¶
StopGraceful requests a graceful shutdown and waits for completion.