Skip to content

Commit c321e8c

Browse files
authored
Merge pull request #102 from sshambhavi-252/ss_signed_containerd_update
Updating go-runc Stats to be compliant with OCI runc.Stats
2 parents df3c22d + 2642b42 commit c321e8c

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

events.go

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ type Event struct {
3030

3131
// Stats is statistical information from the runc process
3232
type Stats struct {
33-
Cpu Cpu `json:"cpu"` //revive:disable
34-
Memory Memory `json:"memory"`
35-
Pids Pids `json:"pids"`
36-
Blkio Blkio `json:"blkio"`
37-
Hugetlb map[string]Hugetlb `json:"hugetlb"`
33+
Cpu Cpu `json:"cpu"` //revive:disable
34+
Memory Memory `json:"memory"`
35+
Pids Pids `json:"pids"`
36+
Blkio Blkio `json:"blkio"`
37+
Hugetlb map[string]Hugetlb `json:"hugetlb"`
38+
NetworkInterfaces []*NetworkInterface `json:"network_interfaces"`
3839
}
3940

4041
// Hugetlb represents the detailed hugetlb component of the statistics data
@@ -113,3 +114,17 @@ type Memory struct {
113114
KernelTCP MemoryEntry `json:"kernelTCP,omitempty"`
114115
Raw map[string]uint64 `json:"raw,omitempty"`
115116
}
117+
118+
type NetworkInterface struct {
119+
// Name is the name of the network interface.
120+
Name string
121+
122+
RxBytes uint64
123+
RxPackets uint64
124+
RxErrors uint64
125+
RxDropped uint64
126+
TxBytes uint64
127+
TxPackets uint64
128+
TxErrors uint64
129+
TxDropped uint64
130+
}

0 commit comments

Comments
 (0)