criticality

package
v0.6.25 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// EmptyCriticality is used to mark any invalid criticality, and the empty criticality will be parsed as the default criticality later.
	EmptyCriticality = Criticality("")
	// CriticalPlus is reserved for the most critical requests, those that will result in serious user-visible impact if they fail.
	CriticalPlus = Criticality("CRITICAL_PLUS")
	// Critical is the default value for requests sent from production jobs. These requests will result in user-visible impact, but the impact may be less severe than those of CRITICAL_PLUS. Services are expected to provision enough capacity for all expected CRITICAL and CRITICAL_PLUS traffic.
	Critical = Criticality("CRITICAL")
	// SheddablePlus is traffic for which partial unavailability is expected. This is the default for batch jobs, which can retry requests minutes or even hours later.
	SheddablePlus = Criticality("SHEDDABLE_PLUS")
	// Sheddable is traffic for which frequent partial unavailability and occasional full unavailability is expected.
	Sheddable = Criticality("SHEDDABLE")
)

criticality

Functions

func Exist

func Exist(c Criticality) bool

Exist is used to check criticality is exist in several enumeration.

func Value

func Value(in Criticality) int

Value is used to get criticality value, higher value is more critical.

Types

type Criticality

type Criticality string

Criticality is

func Parse

func Parse(raw string) Criticality

Parse will parse raw criticality string as valid critality. Any invalid input will parse as empty criticality.

func (Criticality) Higher

func (c Criticality) Higher(in Criticality) bool

Higher will compare the input criticality with self, return true if the input is more critical than self.

Jump to

Keyboard shortcuts

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