MCPcopy Create free account
hub / github.com/deepflowio/deepflow / AformatRealEntry

Function AformatRealEntry

cli/ctl/agent_check.go:430–441  ·  view source on GitHub ↗
(entry *agent.RealClientToRealServer)

Source from the content-addressed store, hash-verified

428}
429
430func AformatRealEntry(entry *agent.RealClientToRealServer) string {
431 buffer := bytes.Buffer{}
432 format := "{epc_id_1: %d, ipv4_1: %s, port_1: %d, " +
433 "epc_id_0: %d, ipv4_0: %s, port_0: %d, " +
434 "epc_id_real: %d, ipv4_real: %s, port_real: %d, pid_real: %d, agent_id_real: %d}"
435 buffer.WriteString(fmt.Sprintf(format,
436 entry.GetEpcId_1(), utils.IpFromUint32(entry.GetIpv4_1()).String(), entry.GetPort_1(),
437 entry.GetEpcId_0(), utils.IpFromUint32(entry.GetIpv4_0()).String(), entry.GetPort_0(),
438 entry.GetEpcIdReal(), utils.IpFromUint32(entry.GetIpv4Real()).String(),
439 entry.GetPortReal(), entry.GetPidReal(), entry.GetAgentIdReal()))
440 return buffer.String()
441}
442
443func ArealGlobal(cmd *cobra.Command) {
444 conn := agentGetConn(cmd)

Callers 1

ArealGlobalFunction · 0.85

Calls 2

WriteStringMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected