Add metrics type alias

This will help to decouple the import in CRI from the cgroups package
directly by importing the type alias in containerd repo.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2019-09-19 14:13:56 -04:00
parent d4802a64f9
commit f3148d0b98
8 changed files with 122 additions and 77 deletions

44
metrics/types/v1/types.go Normal file
View File

@@ -0,0 +1,44 @@
// +build linux
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
import "github.com/containerd/cgroups"
type (
// Metrics alias
Metrics = cgroups.Metrics
// BlkIOEntry alias
BlkIOEntry = cgroups.BlkIOEntry
// MemoryStat alias
MemoryStat = cgroups.MemoryStat
// CPUStat alias
CPUStat = cgroups.CPUStat
// CPUUsage alias
CPUUsage = cgroups.CPUUsage
// BlkIOStat alias
BlkIOStat = cgroups.BlkIOStat
// PidsStat alias
PidsStat = cgroups.PidsStat
// RdmaStat alias
RdmaStat = cgroups.RdmaStat
// RdmaEntry alias
RdmaEntry = cgroups.RdmaEntry
// HugetlbStat alias
HugetlbStat = cgroups.HugetlbStat
)