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:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user