Skip to content

Commit

Permalink
refactor report_device_metadata.go
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreYang committed Nov 22, 2023
1 parent c4b94b5 commit 2c1d34d
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,17 @@ func (ms *MetricSender) ReportNetworkDeviceMetadata(config *checkconfig.CheckCon
ipAddresses := buildNetworkIPAddressesMetadata(config.DeviceID, metadataStore)
topologyLinks := buildNetworkTopologyMetadata(config.DeviceID, metadataStore, interfaces)

metadataPayloads := devicemetadata.BatchPayloads(config.Namespace, config.ResolvedSubnetName, collectTime, devicemetadata.PayloadMetadataBatchSize, devices, interfaces, ipAddresses, topologyLinks, nil, diagnoses)
metadataPayloads := devicemetadata.BatchPayloads(
config.Namespace, config.ResolvedSubnetName,
collectTime,
devicemetadata.PayloadMetadataBatchSize,
devices,
interfaces,
ipAddresses,
topologyLinks,
nil,
diagnoses,
)

for _, payload := range metadataPayloads {
payloadBytes, err := json.Marshal(payload)
Expand Down

0 comments on commit 2c1d34d

Please sign in to comment.