Documentation
¶
Overview ¶
Package credentialweight defines shared credential weight validation and parsing.
Index ¶
Constants ¶
View Source
const ( // Default is used when a credential does not define a weight. Default int64 = 1 // Max bounds scheduler arithmetic while allowing practical proportional routing. Max int64 = 1_000_000 )
Variables ¶
This section is empty.
Functions ¶
func Normalize ¶
Normalize validates and normalizes an explicit weight. Non-positive values are valid and normalize to zero, which excludes the credential from weighted routing.
func ParseString ¶
ParseString parses a scheduler attribute. An empty value uses the default weight.
func ParseValue ¶
ParseValue parses a JSON-compatible auth-file metadata value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.