Change plain number response to Decimal String.

Signed-off-by: Shikachuu <zcmate@gmail.com>
This commit is contained in:
Shikachuu 2021-09-20 21:02:55 +02:00 committed by Alex Ellis
parent d5fcc7b2ab
commit c5f167df21

View File

@ -38,7 +38,7 @@ func MakeReadHandler(client *containerd.Client) func(w http.ResponseWriter, r *h
for _, fn := range fns {
annotations := &fn.annotations
labels := &fn.labels
memory := resource.NewQuantity(fn.memoryLimit, resource.BinarySI)
memory := resource.NewQuantity(fn.memoryLimit, resource.DecimalSI)
res = append(res, types.FunctionStatus{
Name: fn.name,
Image: fn.image,
@ -49,7 +49,7 @@ func MakeReadHandler(client *containerd.Client) func(w http.ResponseWriter, r *h
Secrets: fn.secrets,
EnvVars: fn.envVars,
EnvProcess: fn.envProcess,
Limits: &types.FunctionResources{Memory: memory.String()},
Limits: &types.FunctionResources{Memory: memory.ToDec().String()},
CreatedAt: fn.createdAt,
})
}