MCPcopy Index your code
hub / github.com/deepflowio/deepflow / AformatString

Function AformatString

cli/ctl/agent_check.go:552–568  ·  view source on GitHub ↗
(data *agent.Interface)

Source from the content-addressed store, hash-verified

550}
551
552func AformatString(data *agent.Interface) string {
553 buffer := bytes.Buffer{}
554 format := "Id: %d Mac: %s EpcId: %d DeviceType: %d IfType: %d" +
555 " RegionId: %d " +
556 " PodClusterId: %d, IsVipInterface: %t "
557 buffer.WriteString(fmt.Sprintf(format, data.GetId(), Uint64ToMac(data.GetMac()),
558 data.GetEpcId(), data.GetDeviceType(), data.GetIfType(), data.GetRegionId(),
559 data.GetPodClusterId(),
560 data.GetIsVipInterface()))
561 if data.GetPodNodeId() > 0 {
562 buffer.WriteString(fmt.Sprintf("PodNodeId: %d ", data.GetPodNodeId()))
563 }
564 if len(data.GetIpResources()) > 0 {
565 buffer.WriteString(fmt.Sprintf("IpResources: %s", data.GetIpResources()))
566 }
567 return buffer.String()
568}
569
570func AplatformData(response *agent.SyncResponse) {
571 platform := agent.PlatformData{}

Callers 1

AplatformDataFunction · 0.85

Calls 3

WriteStringMethod · 0.80
Uint64ToMacFunction · 0.70
StringMethod · 0.65

Tested by

no test coverage detected