(entry *agent.GlobalGPIDEntry)
| 334 | } |
| 335 | |
| 336 | func AformatGlobalEntry(entry *agent.GlobalGPIDEntry) string { |
| 337 | buffer := bytes.Buffer{} |
| 338 | format := "{ protocol: %d, agent_id_1: %d, epc_id_1: %d, ipv4_1: %s, port_1: %d, pid_1: %d, gpid_1: %d " + |
| 339 | "agent_id_0: %d, epc_id_0: %d, ipv4_0: %s, port_0: %d, pid_0: %d, gpid_0: %d, netns_idx: %d}" |
| 340 | buffer.WriteString(fmt.Sprintf(format, |
| 341 | entry.GetProtocol(), |
| 342 | entry.GetAgentId_1(), entry.GetEpcId_1(), utils.IpFromUint32(entry.GetIpv4_1()).String(), entry.GetPort_1(), entry.GetPid_1(), entry.GetGpid_1(), |
| 343 | entry.GetAgentId_0(), entry.GetEpcId_0(), utils.IpFromUint32(entry.GetIpv4_0()).String(), entry.GetPort_0(), entry.GetPid_0(), entry.GetGpid_0(), |
| 344 | entry.GetNetnsIdx())) |
| 345 | |
| 346 | return buffer.String() |
| 347 | } |
| 348 | |
| 349 | func AgpidGlobalTable(cmd *cobra.Command) { |
| 350 | conn := agentGetConn(cmd) |
no test coverage detected