[ CMII ] [ Operator ] - docker api

This commit is contained in:
zeaslity
2024-01-22 15:14:00 +08:00
parent 9aaabc0337
commit 6af2e2e0bf
7 changed files with 132 additions and 41 deletions

View File

@@ -2,8 +2,8 @@ package status
import (
"encoding/json"
"errors"
"fmt"
"github.com/go-openapi/errors"
"github.com/shirou/gopsutil/v3/net"
net2 "net"
"regexp"
@@ -59,7 +59,7 @@ func GetNetworkMetric() ([]NetworkMetric, error) {
if !contains {
msg := "[GetNetworkMetric]- can not find desired net interface !"
log.Warn(msg)
return nil, errors.New(233, msg)
return nil, errors.New(msg)
}
ioCountersStats, err := net.IOCounters(true)