# Functions
Add resources returning a new resource with the result A nil resource is considered an empty resource.
No description provided by the author
Returns a new resource with the largest value for each quantity in the resources If either resource passed in is nil a zero resource is returned.
Returns a new resource with the smallest value for each quantity in the resources If either resource passed in is nil a zero resource is returned If a resource type is missing from one of the Resource, it is considered 0.
Returns a new Resource with the smallest value for each quantity in the Resources If either Resource passed in is nil the other Resource is returned If a Resource type is missing from one of the Resource, it is considered empty and the quantity from the other Resource is returned.
Calculate share for left of total and right of total.
Calculate share for left of total and right of total separately.
Compare two resources usage shares and assumes a nil total resource.
Compare the resources equal returns the specific values for following cases: left right return nil nil true nil <set> false <set> nil false <set> <set> true/false *based on the individual Quantity values.
Compare the resources equal returns the specific values for following cases: left right return nil nil true nil <set> false nil zero res true <set> nil false zero res nil true <set> <set> true/false *based on the individual Quantity values.
Get fairness ratio calculated by: highest share for left resource from total divided by highest share for right resource from total.
Check if smaller fits in larger Types not defined in the larger resource are considered 0 values for Quantity A nil resource is treated as an empty resource (all types are 0).
Check that the whole resource is zero A nil or empty resource is zero (contrary to StrictlyGreaterThanZero).
Return the largest quantity.
Return the smallest quantity.
Multiply the resource by the integer ratio returning a new resource.
Multiply the resource by the floating point ratio returning a new resource.
No description provided by the author
Create a new resource from the config map.
No description provided by the author
No description provided by the author
Create a new resource from a string.
Return true if all quantities in larger > smaller Two resources that are equal are not considered strictly larger than each other.
Return true if all quantities in larger > smaller or if the two objects are exactly the same.
Have at least one quantity > 0, and no quantities < 0 A nil resource is not strictly greater than zero.
Subtract resource returning a new resource with the result A nil resource is considered an empty resource This might return negative values for specific quantities.
Subtract resource returning a new resource with the result A nil resource is considered an empty resource This will return 0 values for negative values.
Subtract resource returning a new resource with the result.
# Variables
Never update value of Zero.
# Type aliases
No unit defined here for better performance.