Rename "v1" to "statsV1"
follow-up to27552ceb15
, where this was left as a review comment, but the PR was already merged. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit9a7e96b5b7
) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
9ab162a73a
commit
4d190af804
|
@ -16,7 +16,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"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"
|
||||||
"github.com/docker/docker/api/types/blkiodev"
|
"github.com/docker/docker/api/types/blkiodev"
|
||||||
pblkiodev "github.com/docker/docker/api/types/blkiodev"
|
pblkiodev "github.com/docker/docker/api/types/blkiodev"
|
||||||
|
@ -1347,7 +1347,7 @@ func (daemon *Daemon) conditionalUnmountOnCleanup(container *container.Container
|
||||||
return daemon.Unmount(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))
|
out := make([]types.BlkioStatEntry, len(entries))
|
||||||
for i, re := range entries {
|
for i, re := range entries {
|
||||||
out[i] = types.BlkioStatEntry{
|
out[i] = types.BlkioStatEntry{
|
||||||
|
|
|
@ -3,7 +3,7 @@ package types // import "github.com/docker/docker/libcontainerd/types"
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
v1 "github.com/containerd/cgroups/stats/v1"
|
statsV1 "github.com/containerd/cgroups/stats/v1"
|
||||||
specs "github.com/opencontainers/runtime-spec/specs-go"
|
specs "github.com/opencontainers/runtime-spec/specs-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -13,13 +13,13 @@ type Summary struct{}
|
||||||
// Stats holds metrics properties as returned by containerd
|
// Stats holds metrics properties as returned by containerd
|
||||||
type Stats struct {
|
type Stats struct {
|
||||||
Read time.Time
|
Read time.Time
|
||||||
Metrics *v1.Metrics
|
Metrics *statsV1.Metrics
|
||||||
}
|
}
|
||||||
|
|
||||||
// InterfaceToStats returns a stats object from the platform-specific interface.
|
// InterfaceToStats returns a stats object from the platform-specific interface.
|
||||||
func InterfaceToStats(read time.Time, v interface{}) *Stats {
|
func InterfaceToStats(read time.Time, v interface{}) *Stats {
|
||||||
return &Stats{
|
return &Stats{
|
||||||
Metrics: v.(*v1.Metrics),
|
Metrics: v.(*statsV1.Metrics),
|
||||||
Read: read,
|
Read: read,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue