-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[chore][extension/observer] Assign exported function observer.NewEndpointsWatcher
to a variable and pass checkapi
#29321
Conversation
…pointsWatcher` to a variable and pass checkapi Signed-off-by: sakulali <sakulali@126.com>
e2d23f9
to
6f92deb
Compare
@@ -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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's cheating :) there is no functional difference here. Since this is acting as a library, maybe we can discuss moving this to internal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should i close or draft this PR since we maybe need to move this to internal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd close the PR. Thanks for the work on this, it's possible that moving the code to internal is rejected on the basis that this package is considered as a library, but not sure.
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Description:
Assign exported function
observer.NewEndpointsWatcher
to a variable and pass checkapi.Link to tracking Issue:
#26304
Testing:
go run cmd/checkapi/main.go .
go test for observer
go test for dockerobserver
go test for ecsobserver
go test for ecstaskobserver
go test for hostobserver
go test for k8sobserver
Documentation: