1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #40167 from thaJeztah/stats_alias

Rename "v1" to "statsV1"
This commit is contained in:
Kirill Kolyshkin 2019-11-04 17:22:34 -08:00 committed by GitHub
commit 76dbd884d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -16,7 +16,7 @@ import (
"strings"
"time"
v1 "github.com/containerd/cgroups/stats/v1"
statsV1 "github.com/containerd/cgroups/stats/v1"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/blkiodev"
pblkiodev "github.com/docker/docker/api/types/blkiodev"
@ -1376,7 +1376,7 @@ func (daemon *Daemon) conditionalUnmountOnCleanup(container *container.Container
return daemon.Unmount(container)
}
func copyBlkioEntry(entries []*v1.BlkIOEntry) []types.BlkioStatEntry {
func copyBlkioEntry(entries []*statsV1.BlkIOEntry) []types.BlkioStatEntry {
out := make([]types.BlkioStatEntry, len(entries))
for i, re := range entries {
out[i] = types.BlkioStatEntry{

View file

@ -3,7 +3,7 @@ package types // import "github.com/docker/docker/libcontainerd/types"
import (
"time"
v1 "github.com/containerd/cgroups/stats/v1"
statsV1 "github.com/containerd/cgroups/stats/v1"
specs "github.com/opencontainers/runtime-spec/specs-go"
)
@ -13,13 +13,13 @@ type Summary struct{}
// Stats holds metrics properties as returned by containerd
type Stats struct {
Read time.Time
Metrics *v1.Metrics
Metrics *statsV1.Metrics
}
// InterfaceToStats returns a stats object from the platform-specific interface.
func InterfaceToStats(read time.Time, v interface{}) *Stats {
return &Stats{
Metrics: v.(*v1.Metrics),
Metrics: v.(*statsV1.Metrics),
Read: read,
}
}