Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checkpoint ¶ added in v1.32.0
type Checkpoint struct { // Data is a serialized PodResourceAllocationInfo Data string `json:"data"` // Checksum is a checksum of Data Checksum checksum.Checksum `json:"checksum"` }
Checkpoint represents a structure to store pod resource allocation checkpoint data
func NewCheckpoint ¶ added in v1.32.0
func NewCheckpoint(allocations *PodResourceAllocationInfo) (*Checkpoint, error)
NewCheckpoint creates a new checkpoint from a list of claim info states
func (*Checkpoint) GetPodResourceAllocationInfo ¶ added in v1.32.0
func (cp *Checkpoint) GetPodResourceAllocationInfo() (*PodResourceAllocationInfo, error)
GetPodResourceAllocationInfo returns Pod Resource Allocation info states from checkpoint
func (*Checkpoint) MarshalCheckpoint ¶ added in v1.32.0
func (cp *Checkpoint) MarshalCheckpoint() ([]byte, error)
func (*Checkpoint) UnmarshalCheckpoint ¶ added in v1.32.0
func (cp *Checkpoint) UnmarshalCheckpoint(blob []byte) error
UnmarshalCheckpoint unmarshals checkpoint from JSON
func (*Checkpoint) VerifyChecksum ¶ added in v1.32.0
func (cp *Checkpoint) VerifyChecksum() error
VerifyChecksum verifies that current checksum of checkpointed Data is valid
type PodResizeStatus ¶
type PodResizeStatus map[string]v1.PodResizeStatus
PodResizeStatus type is used in tracking the last resize decision for pod
type PodResourceAllocation ¶
type PodResourceAllocation map[string]map[string]v1.ResourceRequirements
PodResourceAllocation type is used in tracking resources allocated to pod's containers
func (PodResourceAllocation) Clone ¶
func (pr PodResourceAllocation) Clone() PodResourceAllocation
Clone returns a copy of PodResourceAllocation
type PodResourceAllocationInfo ¶ added in v1.32.0
type PodResourceAllocationInfo struct {
AllocationEntries map[string]map[string]v1.ResourceRequirements `json:"allocationEntries,omitempty"`
}
type Reader ¶
type Reader interface { GetContainerResourceAllocation(podUID string, containerName string) (v1.ResourceRequirements, bool) GetPodResourceAllocation() PodResourceAllocation GetPodResizeStatus(podUID string) v1.PodResizeStatus }
Reader interface used to read current pod resource allocation state
type State ¶
type State interface { Reader // contains filtered or unexported methods }
State interface provides methods for tracking and setting pod resource allocation
func NewNoopStateCheckpoint ¶
func NewNoopStateCheckpoint() State
NewNoopStateCheckpoint creates a dummy state checkpoint manager
func NewStateCheckpoint ¶
NewStateCheckpoint creates new State for keeping track of pod resource allocations with checkpoint backend
func NewStateMemory ¶
func NewStateMemory() State
NewStateMemory creates new State to track resources allocated to pods