Function shipcat_definitions::structs::resources::parse_memory[][src]

pub fn parse_memory(s: &str) -> Result<f64>
Expand description

Parse normal k8s memory/disk resource value into floats

Note that kubernetes insists on using upper case K for kilo against SI conventions:

You can express memory as a plain integer or as a fixed-point integer using one of these suffixes: E, P, T, G, M, K. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-memory