Skip to content

Commit

Permalink
Merge pull request #102 from sshambhavi-252/ss_signed_containerd_update
Browse files Browse the repository at this point in the history
Updating go-runc Stats to be compliant with OCI runc.Stats
  • Loading branch information
estesp authored Oct 2, 2023
2 parents df3c22d + 2642b42 commit c321e8c
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions events.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ type Event struct {

// Stats is statistical information from the runc process
type Stats struct {
Cpu Cpu `json:"cpu"` //revive:disable
Memory Memory `json:"memory"`
Pids Pids `json:"pids"`
Blkio Blkio `json:"blkio"`
Hugetlb map[string]Hugetlb `json:"hugetlb"`
Cpu Cpu `json:"cpu"` //revive:disable
Memory Memory `json:"memory"`
Pids Pids `json:"pids"`
Blkio Blkio `json:"blkio"`
Hugetlb map[string]Hugetlb `json:"hugetlb"`
NetworkInterfaces []*NetworkInterface `json:"network_interfaces"`
}

// Hugetlb represents the detailed hugetlb component of the statistics data
Expand Down Expand Up @@ -113,3 +114,17 @@ type Memory struct {
KernelTCP MemoryEntry `json:"kernelTCP,omitempty"`
Raw map[string]uint64 `json:"raw,omitempty"`
}

type NetworkInterface struct {
// Name is the name of the network interface.
Name string

RxBytes uint64
RxPackets uint64
RxErrors uint64
RxDropped uint64
TxBytes uint64
TxPackets uint64
TxErrors uint64
TxDropped uint64
}

0 comments on commit c321e8c

Please sign in to comment.