Skip to content

Commit

Permalink
cpuallocator: add WithAllocFlags option.
Browse files Browse the repository at this point in the history
Allow overriding the default allocation flags using the WithAllocFlags
option.

Signed-off-by: Krisztian Litkey <[email protected]>
  • Loading branch information
klihub authored and askervin committed Nov 19, 2024
1 parent 8c3015b commit a78bf6b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/cpuallocator/allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ func WithPriority(p CPUPriority) Option {
}
}

// WithAllocFlags sets the allocation flags for the allocation.
func WithAllocFlags(flags AllocFlag) Option {
return func(a *allocatorHelper) error {
a.flags = flags
return nil
}
}

type cpuAllocator struct {
logger.Logger
sys sysfs.System // wrapped sysfs.System instance
Expand Down

0 comments on commit a78bf6b

Please sign in to comment.