Re-implement ContainerInspect call in Wings to use more performant json encoder (#119)

* First pass at re-implementing the Docker inspect call to use more efficient json parser

* Improve logic
This commit is contained in:
Dane Everitt
2022-01-23 14:13:49 -08:00
committed by GitHub
parent 34c0db9dff
commit 34ecf20467
6 changed files with 126 additions and 9 deletions

View File

@@ -16,7 +16,7 @@ import (
// Uptime returns the current uptime of the container in milliseconds. If the
// container is not currently running this will return 0.
func (e *Environment) Uptime(ctx context.Context) (int64, error) {
ins, err := e.client.ContainerInspect(ctx, e.Id)
ins, err := e.ContainerInspect(ctx)
if err != nil {
return 0, errors.Wrap(err, "environment: could not inspect container")
}