[Agent] [Octopus] - caqa fix bugs
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
"wdd.io/agent-go/utils"
|
||||
)
|
||||
|
||||
type NetworkMetric struct {
|
||||
@@ -165,6 +166,18 @@ func GetNetworkInfo() ([]NetworkInfo, error) {
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func GetLocalHostIP() string {
|
||||
interfaceStatList, err := net.Interfaces()
|
||||
if err != nil {
|
||||
log.ErrorF("[GetLocalHostIP] -- error %s", err.Error())
|
||||
return ""
|
||||
}
|
||||
|
||||
utils.BeautifulPrint(interfaceStatList)
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
func GetNetworkConnectionALl() []net.ConnectionStat {
|
||||
|
||||
connections, err := net.Connections("all")
|
||||
|
||||
Reference in New Issue
Block a user