d3379946ec
For now docker stats will sum the rxbytes, txbytes, etc. of all the interfaces. It is OK for the output of CLI `docker stats` but not good for the API response, especially when the container is in sereval subnets. It's better to leave these origianl data to user. Signed-off-by: Hu Keping <hukeping@huawei.com>
14 lines
427 B
Go
14 lines
427 B
Go
package daemon
|
|
|
|
import (
|
|
"github.com/docker/docker/api/types"
|
|
"github.com/opencontainers/runc/libcontainer"
|
|
)
|
|
|
|
// convertStatsToAPITypes converts the libcontainer.Stats to the api specific
|
|
// structs. This is done to preserve API compatibility and versioning.
|
|
func convertStatsToAPITypes(ls *libcontainer.Stats) *types.StatsJSON {
|
|
// TODO Windows. Refactor accordingly to fill in stats.
|
|
s := &types.StatsJSON{}
|
|
return s
|
|
}
|