Skip to content

Commit b170147

Browse files
authored
Merge pull request #1290 from uniemimu/unexport
unexport internal types
2 parents b54ba7a + 8ed705d commit b170147

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,20 @@ type ResourceManager interface {
8585
SetDevInfos(DeviceInfoMap)
8686
}
8787

88-
type ContainerAssignments struct {
88+
type containerAssignments struct {
8989
deviceIds map[string]bool
9090
tileEnv string
9191
}
9292

93-
type PodAssignmentDetails struct {
94-
containers []ContainerAssignments
93+
type podAssignmentDetails struct {
94+
containers []containerAssignments
9595
}
9696

9797
type resourceManager struct {
9898
clientset kubernetes.Interface
9999
deviceInfos DeviceInfoMap
100100
prGetClientFunc getClientFunc
101-
assignments map[string]PodAssignmentDetails // pod name -> assignment details
101+
assignments map[string]podAssignmentDetails // pod name -> assignment details
102102
nodeName string
103103
skipID string
104104
fullResourceName string
@@ -139,7 +139,7 @@ func NewResourceManager(skipID, fullResourceName string) (ResourceManager, error
139139
skipID: skipID,
140140
fullResourceName: fullResourceName,
141141
prGetClientFunc: podresources.GetV1Client,
142-
assignments: make(map[string]PodAssignmentDetails),
142+
assignments: make(map[string]podAssignmentDetails),
143143
retryTimeout: 1 * time.Second,
144144
cleanupInterval: 2 * time.Minute,
145145
}
@@ -331,7 +331,7 @@ func (rm *resourceManager) GetPreferredFractionalAllocation(request *pluginapi.P
331331
assignments, found := rm.assignments[podKey]
332332

333333
if !found {
334-
assignments.containers = make([]ContainerAssignments, podCandidate.allocationTargetNum)
334+
assignments.containers = make([]containerAssignments, podCandidate.allocationTargetNum)
335335
}
336336

337337
assignments.containers[containerIndex].tileEnv = affinityMask

cmd/gpu_plugin/rm/gpu_plugin_resource_manager_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func newMockResourceManager(pods []v1.Pod) ResourceManager {
101101
},
102102
skipID: "all",
103103
fullResourceName: "gpu.intel.com/i915",
104-
assignments: make(map[string]PodAssignmentDetails),
104+
assignments: make(map[string]podAssignmentDetails),
105105
retryTimeout: 1 * time.Millisecond,
106106
}
107107

0 commit comments

Comments
 (0)