Skip to content

Commit 1ef66e3

Browse files
committed
fixing go lint err
1 parent 382c150 commit 1ef66e3

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

npm/pkg/dataplane/dataplane.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ type DataPlane struct {
6969
ioShim *common.IOShim
7070
updatePodCache *updatePodCache
7171
endpointQuery *endpointQuery
72-
endpointQueryL1VH *endpointQuery //windows -> filter for state 2 (attached) endpoints in l1vh
72+
endpointQueryL1VH *endpointQuery // windows -> filter for state 2 (attached) endpoints in l1vh
7373
applyInfo *applyInfo
7474
netPolQueue *netPolQueue
7575
// removePolicyInfo tracks when a policy was removed yet had ApplyIPSet failures.

npm/pkg/dataplane/dataplane_windows.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,13 @@ func (dp *DataPlane) initializeDataPlane() error {
6565

6666
filter, err := marshalFilterMap(filterMap)
6767

68-
filterL1VH, err := marshalFilterMap(filterMapL1VH)
68+
filterL1VH, errL1VH := marshalFilterMap(filterMapL1VH)
69+
70+
if err != nil {
71+
return err
72+
} else if errL1VH != nil {
73+
return errL1VH
74+
}
6975

7076
dp.endpointQuery.query.Filter = string(filter)
7177
dp.endpointQueryL1VH.query.Filter = string(filterL1VH)
@@ -360,6 +366,7 @@ func (dp *DataPlane) getLocalPodEndpoints() ([]*hcn.HostComputeEndpoint, error)
360366
if dp.EnableNPMLite {
361367
timer = metrics.StartNewTimer()
362368
endpointsAttached, errL1vh := dp.ioShim.Hns.ListEndpointsQuery(dp.endpointQueryL1VH.query)
369+
metrics.RecordListEndpointsLatency(timer)
363370
if errL1vh != nil {
364371
metrics.IncListEndpointsFailures()
365372
return nil, npmerrors.SimpleErrorWrapper("failed to get local pod endpoints in L1VH", err)

0 commit comments

Comments
 (0)