(quota *int64, period *uint64)
| 34 | ) |
| 35 | |
| 36 | func NewCPUMax(quota *int64, period *uint64) CPUMax { |
| 37 | max := defaultCPUMax |
| 38 | if quota != nil { |
| 39 | max = strconv.FormatInt(*quota, 10) |
| 40 | } |
| 41 | |
| 42 | duration := defaultCPUMaxPeriodStr |
| 43 | if period != nil { |
| 44 | duration = strconv.FormatUint(*period, 10) |
| 45 | } |
| 46 | return CPUMax(strings.Join([]string{max, duration}, " ")) |
| 47 | } |
| 48 | |
| 49 | type CPU struct { |
| 50 | Weight *uint64 |
searching dependent graphs…