package state
import "k8s.io/kubernetes/pkg/kubelet/cm/dra/state"
Index ¶
- func NewCheckpointState(stateDir, checkpointName string) (*stateCheckpoint, error)
- type CheckpointState
- type ClaimInfoState
- type ClaimInfoStateList
- type DRAManagerCheckpoint
Functions ¶
func NewCheckpointState ¶
NewCheckpointState creates new State for keeping track of claim info with checkpoint backend
Types ¶
type CheckpointState ¶
type CheckpointState interface { GetOrCreate() (ClaimInfoStateList, error) Store(ClaimInfoStateList) error }
CheckpointState interface provides to get and store state
type ClaimInfoState ¶
type ClaimInfoState struct { // Name of the DRA driver DriverName string // ClassName is a resource class of the claim ClassName string // ClaimUID is an UID of the resource claim ClaimUID types.UID // ClaimName is a name of the resource claim ClaimName string // Namespace is a claim namespace Namespace string // PodUIDs is a set of pod UIDs that reference a resource PodUIDs sets.Set[string] // CDIDevices is a map of DriverName --> CDI devices returned by the // GRPC API call NodePrepareResource CDIDevices map[string][]string }
ClaimInfoState is used to store claim info state in a checkpoint
type ClaimInfoStateList ¶
type ClaimInfoStateList []ClaimInfoState
List of claim info to store in checkpoint
type DRAManagerCheckpoint ¶
type DRAManagerCheckpoint struct { Version string `json:"version"` Entries ClaimInfoStateList `json:"entries,omitempty"` Checksum checksum.Checksum `json:"checksum"` }
DRAManagerCheckpoint struct is used to store pod dynamic resources assignments in a checkpoint
func NewDRAManagerCheckpoint ¶
func NewDRAManagerCheckpoint() *DRAManagerCheckpoint
NewDRAManagerCheckpoint returns an instance of Checkpoint
func (*DRAManagerCheckpoint) MarshalCheckpoint ¶
func (dc *DRAManagerCheckpoint) MarshalCheckpoint() ([]byte, error)
MarshalCheckpoint returns marshalled checkpoint
func (*DRAManagerCheckpoint) UnmarshalCheckpoint ¶
func (dc *DRAManagerCheckpoint) UnmarshalCheckpoint(blob []byte) error
UnmarshalCheckpoint tries to unmarshal passed bytes to checkpoint
func (*DRAManagerCheckpoint) VerifyChecksum ¶
func (dc *DRAManagerCheckpoint) VerifyChecksum() error
VerifyChecksum verifies that current checksum of checkpoint is valid
Source Files ¶
checkpoint.go state_checkpoint.go
- Version
- v1.27.8
- Published
- Nov 15, 2023
- Platform
- js/wasm
- Imports
- 8 packages
- Last checked
- 19 minutes ago –
Tools for package owners.