Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureAgentSubtree ¶
func EnsureAgentSubtree(policy *CgroupPolicy) error
EnsureAgentSubtree creates the agent cgroup and moves the current process into it.
func MapRuntimeError ¶
func MapRuntimeError(err error, policy *CgroupPolicy) error
MapRuntimeError converts common CRI/crun delegation failures into actionable errors.
func SetGlobalPolicy ¶
func SetGlobalPolicy(p *CgroupPolicy)
SetGlobalPolicy records the active policy after bootstrap.
func ValidatePreflight ¶
func ValidatePreflight(policy *CgroupPolicy) error
ValidatePreflight checks delegation requirements before CRI starts.
Types ¶
type CgroupPolicy ¶
type CgroupPolicy struct {
Mode Mode
Driver Driver
Nested bool
SystemdCgroup bool
UnifiedMountpoint string
AgentCgroupPath string
ContainerdCgroupPath string
DelegatedControllers []string
HybridWarning string
}
CgroupPolicy is the resolved cgroup bootstrap policy for embedded edgelet.
func Bootstrap ¶
func Bootstrap() (*CgroupPolicy, error)
Bootstrap detects policy, ensures the agent subtree, and stores it globally.
func Detect ¶
func Detect() (*CgroupPolicy, error)
Detect inspects the host and returns a recommended cgroup policy.
func GetGlobalPolicy ¶
func GetGlobalPolicy() *CgroupPolicy
GetGlobalPolicy returns the active policy, if bootstrap completed.
func PublishHostPolicy ¶
func PublishHostPolicy() (*CgroupPolicy, error)
PublishHostPolicy runs Detect() and stores the result for status reporting without mutating the cgroup hierarchy. Used by the control plane when EDGELET_RUNTIME_SPLIT=1; bootstrap remains owned by runtime-bootstrap.
type ErrDelegation ¶
ErrDelegation indicates required cgroup controllers are not delegated to edgelet.
func (*ErrDelegation) Error ¶
func (e *ErrDelegation) Error() string
type Snapshot ¶
type Snapshot struct {
Mode string
Driver string
Nested bool
DelegatedControllers string
AgentCgroupPath string
ContainerdCgroupPath string
}
Snapshot exposes cgroup diagnostics for status reporting.
func GetSnapshot ¶
func GetSnapshot() Snapshot
GetSnapshot returns diagnostics for the active policy.
func SnapshotFromPolicy ¶
func SnapshotFromPolicy(p *CgroupPolicy) Snapshot
SnapshotFromPolicy builds a status snapshot from policy.