priority

package
v2.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package priority provides standard priority levels.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Value

type Value int

Value is an integer priority associated with a repo.

const (
	// None is an unspecified priority level.
	None Value = 0
	// Default is the default priority level for everything.
	Default Value = 500
	// Canary is the priority level for canary repos.
	Canary Value = 1300
	// Pin is the priority level for user-pinned repos.
	Pin Value = 1400
	// Rollback is the priority level for rollback repos.
	Rollback Value = 1500
)

func FromString

func FromString(s string) (Value, error)

FromString converts the string s into a priority Value, where s represents either a semantic priority name or an integer.

func (Value) MarshalYAML

func (v Value) MarshalYAML() (any, error)

MarshalYAML marshals a priority value as a semantic name if possible otherwise as an integer.

Jump to

Keyboard shortcuts

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