package state
import "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state"
Index ¶
- type CPUManagerCheckpoint
- type CPUManagerCheckpointV1
- func (cp *CPUManagerCheckpointV1) MarshalCheckpoint() ([]byte, error)
- func (cp *CPUManagerCheckpointV1) UnmarshalCheckpoint(blob []byte) error
- func (cp *CPUManagerCheckpointV1) VerifyChecksum() error
- type CPUManagerCheckpointV2
- func (cp *CPUManagerCheckpointV2) MarshalCheckpoint() ([]byte, error)
- func (cp *CPUManagerCheckpointV2) UnmarshalCheckpoint(blob []byte) error
- func (cp *CPUManagerCheckpointV2) VerifyChecksum() error
- type ContainerCPUAssignments
- type Reader
- type State
Types ¶
type CPUManagerCheckpoint ¶
type CPUManagerCheckpoint struct { PolicyName string `json:"policyName"` DefaultCPUSet string `json:"defaultCpuSet"` Entries map[string]map[string]string `json:"entries,omitempty"` Checksum checksum.Checksum `json:"checksum"` }
CPUManagerCheckpoint struct is used to store cpu/pod assignments in a checkpoint in v2 format
func NewCPUManagerCheckpoint ¶
func NewCPUManagerCheckpoint() *CPUManagerCheckpoint
NewCPUManagerCheckpoint returns an instance of Checkpoint
type CPUManagerCheckpointV1 ¶
type CPUManagerCheckpointV1 struct { PolicyName string `json:"policyName"` DefaultCPUSet string `json:"defaultCpuSet"` Entries map[string]string `json:"entries,omitempty"` Checksum checksum.Checksum `json:"checksum"` }
CPUManagerCheckpointV1 struct is used to store cpu/pod assignments in a checkpoint in v1 format
func (*CPUManagerCheckpointV1) MarshalCheckpoint ¶
func (cp *CPUManagerCheckpointV1) MarshalCheckpoint() ([]byte, error)
MarshalCheckpoint returns marshalled checkpoint in v1 format
func (*CPUManagerCheckpointV1) UnmarshalCheckpoint ¶
func (cp *CPUManagerCheckpointV1) UnmarshalCheckpoint(blob []byte) error
UnmarshalCheckpoint tries to unmarshal passed bytes to checkpoint in v1 format
func (*CPUManagerCheckpointV1) VerifyChecksum ¶
func (cp *CPUManagerCheckpointV1) VerifyChecksum() error
VerifyChecksum verifies that current checksum of checkpoint is valid in v1 format
type CPUManagerCheckpointV2 ¶
type CPUManagerCheckpointV2 = CPUManagerCheckpoint
CPUManagerCheckpointV2 struct is used to store cpu/pod assignments in a checkpoint in v2 format
func (*CPUManagerCheckpointV2) MarshalCheckpoint ¶
func (cp *CPUManagerCheckpointV2) MarshalCheckpoint() ([]byte, error)
MarshalCheckpoint returns marshalled checkpoint in v2 format
func (*CPUManagerCheckpointV2) UnmarshalCheckpoint ¶
func (cp *CPUManagerCheckpointV2) UnmarshalCheckpoint(blob []byte) error
UnmarshalCheckpoint tries to unmarshal passed bytes to checkpoint in v2 format
func (*CPUManagerCheckpointV2) VerifyChecksum ¶
func (cp *CPUManagerCheckpointV2) VerifyChecksum() error
VerifyChecksum verifies that current checksum of checkpoint is valid in v2 format
type ContainerCPUAssignments ¶
ContainerCPUAssignments type used in cpu manager state
func (ContainerCPUAssignments) Clone ¶
func (as ContainerCPUAssignments) Clone() ContainerCPUAssignments
Clone returns a copy of ContainerCPUAssignments
type Reader ¶
type Reader interface { GetCPUSet(podUID string, containerName string) (cpuset.CPUSet, bool) GetDefaultCPUSet() cpuset.CPUSet GetCPUSetOrDefault(podUID string, containerName string) cpuset.CPUSet GetCPUAssignments() ContainerCPUAssignments }
Reader interface used to read current cpu/pod assignment state
type State ¶
type State interface { Reader // contains filtered or unexported methods }
State interface provides methods for tracking and setting cpu/pod assignment
func NewCheckpointState ¶
func NewCheckpointState(stateDir, checkpointName, policyName string, initialContainers containermap.ContainerMap) (State, error)
NewCheckpointState creates new State for keeping track of cpu/pod assignment with checkpoint backend
func NewMemoryState ¶
func NewMemoryState() State
NewMemoryState creates new State for keeping track of cpu/pod assignment
Source Files ¶
checkpoint.go state.go state_checkpoint.go state_mem.go
Directories ¶
Path | Synopsis |
---|---|
pkg/kubelet/cm/cpumanager/state/testing |
- Version
- v1.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 13 packages
- Last checked
- 3 hours ago –
Tools for package owners.