priority

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package priority provides logic to extract and validate the priority of an artifact.

Index

Constants

View Source
const (
	// MaxPriority is the maximum value for the priority annotation.
	MaxPriority = 99
	// MinPriority is the minimum value for the priority annotation.
	MinPriority = 0
	// DefaultPriority is the default priority value used when the priority annotation is not present in the artifact.
	DefaultPriority = 50
	// OCISubPriority is the sub-priority value for OCI-based artifacts.
	OCISubPriority = 1
	// CMSubPriority is the sub-priority value for ConfigMap-based artifacts.
	CMSubPriority = 2
	// InLineRulesSubPriority is the sub-priority value for raw YAML-based artifacts.
	InLineRulesSubPriority = 3
)

Variables

This section is empty.

Functions

func NameFromPriority

func NameFromPriority(priority int32, originalName string) string

NameFromPriority generates a name by combining the priority and original name.

func NameFromPriorityAndSubPriority

func NameFromPriorityAndSubPriority(priority, subPriority int32, originalName string) string

NameFromPriorityAndSubPriority generates a name by combining the priority, sub-priority, and original name. It takes priority, subPriority and originalName as inputs and returns a string formatted as "priority-subPriority-originalName".

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL