|
| 1 | +package integrationtests |
| 2 | + |
| 3 | +type Flowlog struct { |
| 4 | + // Source |
| 5 | + SrcPort int |
| 6 | + SrcK8sType string `json:"SrcK8S_Type"` |
| 7 | + SrcK8sName string `json:"SrcK8S_Name"` |
| 8 | + SrcK8sHostName string `json:"SrcK8S_HostName"` |
| 9 | + SrcK8sOwnerType string `json:"SrcK8S_OwnerType"` |
| 10 | + SrcAddr string |
| 11 | + SrcMac string |
| 12 | + SrcK8sNamespace string `json:"SrcK8S_Namespace"` |
| 13 | + // Destination |
| 14 | + DstPort int |
| 15 | + DstK8sType string `json:"DstK8S_Type"` |
| 16 | + DstK8sName string `json:"DstK8S_Name"` |
| 17 | + DstK8sHostName string `json:"DstK8S_HostName"` |
| 18 | + DstK8sOwnerType string `json:"DstK8S_OwnerType"` |
| 19 | + DstAddr string |
| 20 | + DstMac string |
| 21 | + DstK8sHostIP string `json:"DstK8S_HostIP,omitempty"` |
| 22 | + DstK8sNamespace string `json:"DstK8S_Namespace"` |
| 23 | + // Protocol |
| 24 | + Proto int |
| 25 | + IcmpCode int |
| 26 | + IcmpType int |
| 27 | + Dscp int |
| 28 | + // TODO: check if Flags supposed to be []string? |
| 29 | + Flags int |
| 30 | + // Time |
| 31 | + TimeReceived int |
| 32 | + TimeFlowEndMs int |
| 33 | + TimeFlowStartMs int |
| 34 | + // Interface |
| 35 | + IfDirection int |
| 36 | + IfDirections []int |
| 37 | + Interfaces []string |
| 38 | + Etype int |
| 39 | + // Others |
| 40 | + Packets int |
| 41 | + Bytes int |
| 42 | + Duplicate bool |
| 43 | + AgentIP string |
| 44 | + Sampling int |
| 45 | + HashID string `json:"_HashId,omitempty"` |
| 46 | + IsFirst bool `json:"_IsFirst,omitempty"` |
| 47 | + RecordType string `json:"_RecordType,omitempty"` |
| 48 | + NumFlowLogs int `json:"numFlowLogs,omitempty"` |
| 49 | + K8SClusterName string `json:"K8S_ClusterName,omitempty"` |
| 50 | + // Zone |
| 51 | + SrcK8SZone string `json:"SrcK8S_Zone,omitempty"` |
| 52 | + DstK8SZone string `json:"DstK8S_Zone,omitempty"` |
| 53 | + // DNS |
| 54 | + DNSLatencyMs int `json:"DnsLatencyMs,omitempty"` |
| 55 | + DNSFlagsResponseCode string `json:"DnsFlagsResponseCode,omitempty"` |
| 56 | + // Packet Drop |
| 57 | + PktDropBytes int `json:"PktDropBytes,omitempty"` |
| 58 | + PktDropPackets int `json:"PktDropPackets,omitempty"` |
| 59 | + PktDropLatestState string `json:"PktDropLatestState,omitempty"` |
| 60 | + PktDropLatestDropCause string `json:"PktDropLatestDropCause,omitempty"` |
| 61 | + // RTT |
| 62 | + TimeFlowRttNs int `json:"TimeFlowRttNs,omitempty"` |
| 63 | + // Packet Translation |
| 64 | + XlatDstAddr string `json:"XlatDstAddr,omitempty"` |
| 65 | + XlatDstK8sName string `json:"XlatDstK8S_Name,omitempty"` |
| 66 | + XlatDstK8sNamespace string `json:"XlatDstK8S_Namespace,omitempty"` |
| 67 | + XlatDstK8sType string `json:"XlatDstK8S_Type,omitempty"` |
| 68 | + XlatDstPort int `json:"XlatDstPort,omitempty"` |
| 69 | + XlatSrcAddr string `json:"XlatSrcAddr,omitempty"` |
| 70 | + XlatSrcK8sName string `json:"XlatSrcK8S_Name,omitempty"` |
| 71 | + XlatSrcK8sNamespace string `json:"XlatSrcK8S_Namespace,omitempty"` |
| 72 | + ZoneID int `json:"ZoneId,omitempty"` |
| 73 | + // Network Events |
| 74 | + NetworkEvents []NetworkEvent `json:"NetworkEvents,omitempty"` |
| 75 | + // Secondary Network |
| 76 | + SrcK8sNetworkName string `json:"SrcK8S_NetworkName,omitempty"` |
| 77 | + DstK8sNetworkName string `json:"DstK8S_NetworkName,omitempty"` |
| 78 | + // UDN |
| 79 | + Udns []string `json:"Udns,omitempty"` |
| 80 | +} |
| 81 | +type NetworkEvent struct { |
| 82 | + Action string `json:"Action,omitempty"` |
| 83 | + Type string `json:"Type,omitempty"` |
| 84 | + Name string `json:"Name,omitempty"` |
| 85 | + Namespace string `json:"Namespace,omitempty"` |
| 86 | + Direction string `json:"Direction,omitempty"` |
| 87 | + Feature string `json:"Feature,omitempty"` |
| 88 | +} |
0 commit comments