WIP: Start numeric type for resources

Opening for comments on this approach. Not functional yet.
We might.  ("Limit = all but 4GB" is a reasonable thing to think about for
the future.)


On Fri, Sep 5, 2014 at 1:01 PM, Tim Hockin <notifications@github.com> wrote:

> In pkg/util/numeric.go:
>
> > +	addSIExponent("mi", -10)
> > +	addSIExponent("", 0)
> > +	addSIExponent("Ki", 10)
> > +	addSIExponent("Mi", 20)
> > +	addSIExponent("Gi", 30)
> > +	addSIExponent("Ti", 40)
> > +	addSIExponent("Pi", 50)
> > +	addSIExponent("Xi", 60)
> > +}
> > +
> > +// Numeric is a fixed-point representation of a number.
> > +// It provides convenient marshaling/unmarshaling in JSON and YAML,
> > +// in addition to String() and Int64() accessors.
> > +// The serialization format is:
> > +//
> > +// <serialized>      ::= <sign><numeric> | <numeric>
>
> Do we really need to support negative quantities?
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleCloudPlatform/kubernetes/pull/1185/files#r17194161>
> .
>