type ClaimInfo … type claimInfoCache … // newClaimInfoFromClaim creates a new claim info from a resource claim. // It verifies that the kubelet can handle the claim. func newClaimInfoFromClaim(claim *resourceapi.ResourceClaim) (*ClaimInfo, error) { … } // newClaimInfoFromClaim creates a new claim info from a checkpointed claim info state object. func newClaimInfoFromState(state *state.ClaimInfoState) *ClaimInfo { … } // setCDIDevices adds a set of CDI devices to the claim info. func (info *ClaimInfo) addDevice(driverName string, deviceState state.Device) { … } // addPodReference adds a pod reference to the claim info. func (info *ClaimInfo) addPodReference(podUID types.UID) { … } // hasPodReference checks if a pod reference exists in the claim info. func (info *ClaimInfo) hasPodReference(podUID types.UID) bool { … } // deletePodReference deletes a pod reference from the claim info. func (info *ClaimInfo) deletePodReference(podUID types.UID) { … } // setPrepared marks the claim info as prepared. func (info *ClaimInfo) setPrepared() { … } // isPrepared checks if claim info is prepared or not. func (info *ClaimInfo) isPrepared() bool { … } // newClaimInfoCache creates a new claim info cache object, pre-populated from a checkpoint (if present). func newClaimInfoCache(stateDir, checkpointName string) (*claimInfoCache, error) { … } // withLock runs a function while holding the claimInfoCache lock. func (cache *claimInfoCache) withLock(f func() error) error { … } // withRLock runs a function while holding the claimInfoCache rlock. func (cache *claimInfoCache) withRLock(f func() error) error { … } // add adds a new claim info object into the claim info cache. func (cache *claimInfoCache) add(info *ClaimInfo) *ClaimInfo { … } // contains checks to see if a specific claim info object is already in the cache. func (cache *claimInfoCache) contains(claimName, namespace string) bool { … } // get gets a specific claim info object from the cache. func (cache *claimInfoCache) get(claimName, namespace string) (*ClaimInfo, bool) { … } // delete deletes a specific claim info object from the cache. func (cache *claimInfoCache) delete(claimName, namespace string) { … } // hasPodReference checks if there is at least one claim // that is referenced by the pod with the given UID // This function is used indirectly by the status manager // to check if pod can enter termination status func (cache *claimInfoCache) hasPodReference(uid types.UID) bool { … } // syncToCheckpoint syncs the full claim info cache state to a checkpoint. func (cache *claimInfoCache) syncToCheckpoint() error { … } // cdiDevicesAsList returns a list of CDIDevices from the provided claim info. // When the request name is non-empty, only devices relevant for that request // are returned. func (info *ClaimInfo) cdiDevicesAsList(requestName string) []kubecontainer.CDIDevice { … }