Merge pull request #1290 from uniemimu/unexport

unexport internal types
This commit is contained in:
Ed Bartosh 2022-12-31 16:43:05 +02:00 committed by GitHub
commit b170147fb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -85,20 +85,20 @@ type ResourceManager interface {
SetDevInfos(DeviceInfoMap)
}
type ContainerAssignments struct {
type containerAssignments struct {
deviceIds map[string]bool
tileEnv string
}
type PodAssignmentDetails struct {
containers []ContainerAssignments
type podAssignmentDetails struct {
containers []containerAssignments
}
type resourceManager struct {
clientset kubernetes.Interface
deviceInfos DeviceInfoMap
prGetClientFunc getClientFunc
assignments map[string]PodAssignmentDetails // pod name -> assignment details
assignments map[string]podAssignmentDetails // pod name -> assignment details
nodeName string
skipID string
fullResourceName string
@ -139,7 +139,7 @@ func NewResourceManager(skipID, fullResourceName string) (ResourceManager, error
skipID: skipID,
fullResourceName: fullResourceName,
prGetClientFunc: podresources.GetV1Client,
assignments: make(map[string]PodAssignmentDetails),
assignments: make(map[string]podAssignmentDetails),
retryTimeout: 1 * time.Second,
cleanupInterval: 2 * time.Minute,
}
@ -331,7 +331,7 @@ func (rm *resourceManager) GetPreferredFractionalAllocation(request *pluginapi.P
assignments, found := rm.assignments[podKey]
if !found {
assignments.containers = make([]ContainerAssignments, podCandidate.allocationTargetNum)
assignments.containers = make([]containerAssignments, podCandidate.allocationTargetNum)
}
assignments.containers[containerIndex].tileEnv = affinityMask

View File

@ -101,7 +101,7 @@ func newMockResourceManager(pods []v1.Pod) ResourceManager {
},
skipID: "all",
fullResourceName: "gpu.intel.com/i915",
assignments: make(map[string]PodAssignmentDetails),
assignments: make(map[string]podAssignmentDetails),
retryTimeout: 1 * time.Millisecond,
}