Skip to content

Commit

Permalink
cache: expose DeleteImplicitAffinities.
Browse files Browse the repository at this point in the history
Signed-off-by: Krisztian Litkey <[email protected]>
  • Loading branch information
klihub committed Nov 5, 2024
1 parent 395da2f commit 438a917
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/resmgr/cache/affinity.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func (cch *cache) AddImplicitAffinities(implicit map[string]ImplicitAffinity) er
}

// DeleteImplicitAffinities removes a previously registered set of implicit affinities.
func (cch *cache) DeleteImplicitAffinities(names []string) {
func (cch *cache) DeleteImplicitAffinities(names ...string) {
for _, name := range names {
delete(cch.implicit, name)
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/resmgr/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ type Cache interface {
EvaluateAffinity(*Affinity) map[string]int32
// AddImplicitAffinities adds a set of implicit affinities (added to all containers).
AddImplicitAffinities(map[string]ImplicitAffinity) error
// DeleteImplicitAffinities deletes a set of implicit affinities by name.
DeleteImplicitAffinities(names ...string)

// GetActivePolicy returns the name of the active policy stored in the cache.
GetActivePolicy() string
Expand Down

0 comments on commit 438a917

Please sign in to comment.