From 6f92deb487fd4bf0b29b1f29fc8d3cdc28a6eabd Mon Sep 17 00:00:00 2001 From: sakulali Date: Fri, 17 Nov 2023 13:44:05 +0800 Subject: [PATCH] [chore][extension/observer] Assign exported function `observer.NewEndpointsWatcher` to a variable and pass checkapi Signed-off-by: sakulali --- cmd/checkapi/allowlist.txt | 3 +-- extension/observer/endpointswatcher.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/checkapi/allowlist.txt b/cmd/checkapi/allowlist.txt index c5632e7c69e2..4a37b6ba8b34 100644 --- a/cmd/checkapi/allowlist.txt +++ b/cmd/checkapi/allowlist.txt @@ -1,3 +1,2 @@ connector/servicegraphconnector -extension/observer -processor/servicegraphprocessor \ No newline at end of file +processor/servicegraphprocessor diff --git a/extension/observer/endpointswatcher.go b/extension/observer/endpointswatcher.go index 237d602f647a..2654e6cc3efb 100644 --- a/extension/observer/endpointswatcher.go +++ b/extension/observer/endpointswatcher.go @@ -31,7 +31,7 @@ type EndpointsWatcher struct { logger *zap.Logger } -func NewEndpointsWatcher(endpointsLister EndpointsLister, refreshInterval time.Duration, logger *zap.Logger) *EndpointsWatcher { +var NewEndpointsWatcher = func(endpointsLister EndpointsLister, refreshInterval time.Duration, logger *zap.Logger) *EndpointsWatcher { return &EndpointsWatcher{ EndpointsLister: endpointsLister, RefreshInterval: refreshInterval,