Documentation
¶
Index ¶
- Constants
- func CmpResourceList(a corev1.ResourceList, b corev1.ResourceList) int
- func CmpResourceRequirements(a corev1.ResourceRequirements, b corev1.ResourceRequirements) int
- func ConsecutiveIntsToRange(ints []int32) string
- func EnsureValidLabelValue(s string) string
- func GomaxprocsFromResource(cpu *resource.Quantity) string
- func GomemlimitFromResource(memory *resource.Quantity) string
- func Int2Str(ints []int32) []string
- func MapToArray(data map[int32]bool) []int32
- func ParseIntAnnotation(key string) (int32, error)
- func ParsePartitionsListAnnotation(partitions string) ([]int32, error)
- func ParseTimeAnnotation(ts string) (time.Time, error)
- func PopulateEnv(currentEnv []corev1.EnvVar, resources *corev1.ResourceRequirements, ...) []corev1.EnvVar
- func PrettyPrintResources(r *corev1.ResourceRequirements) string
- func Ptr[T any](v T) *T
- func SetEnv(env []corev1.EnvVar, key string, value string) []corev1.EnvVar
- func SplitIntoBuckets(size int32, desiredBucketSize int32) (buckets [][]int32)
Constants ¶
View Source
const (
TimeLayout = time.RFC3339
)
Variables ¶
This section is empty.
Functions ¶
func CmpResourceList ¶ added in v0.6.1
func CmpResourceList(a corev1.ResourceList, b corev1.ResourceList) int
func CmpResourceRequirements ¶ added in v0.4.1
func CmpResourceRequirements(a corev1.ResourceRequirements, b corev1.ResourceRequirements) int
func ConsecutiveIntsToRange ¶ added in v1.0.2
ConsecutiveIntsToRange takes a list of sorted integers and returns string representation of its range ConsecutiveIntsToRange(0,1,2,3,4,5,6) -> 0-6 ConsecutiveIntsToRange(12,13,14,15,16) -> 12-16
func EnsureValidLabelValue ¶ added in v1.0.2
func GomaxprocsFromResource ¶ added in v0.4.0
func GomemlimitFromResource ¶ added in v1.1.0
func MapToArray ¶ added in v0.9.1
func ParseIntAnnotation ¶ added in v0.9.1
func ParsePartitionsListAnnotation ¶ added in v0.9.1
func PopulateEnv ¶ added in v0.4.0
func PrettyPrintResources ¶ added in v0.4.0
func PrettyPrintResources(r *corev1.ResourceRequirements) string
func SplitIntoBuckets ¶ added in v0.9.1
SplitIntoBuckets takes array size and group size and returns array of arrays e.g.
SplitIntoBuckets(10, 3) -> [0,1,2] [3,4,5] [6,7] [8,9] SplitIntoBuckets(12, 3) -> [0,1,2] [3,4,5] [6,7,8] [9,10,11]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.