Skip to content
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

xds/client: move watchers from xdsclient to a separate struct #4963

Merged
merged 2 commits into from
Nov 9, 2021

Conversation

menghanl
Copy link
Contributor

@menghanl menghanl commented Nov 8, 2021

  • a new pubsub package to manage the watchers
    • it also handles new updates, and calls the watcher callbacks
  • move more types to package xdsresource
    • most of the changes in tests and other packages are due to this
    • this is necessary to avoid cycular dependency (xdsclient -> pubsub -> xdsclient's types)

RELEASE NOTES: N/A

@menghanl menghanl requested a review from easwars November 8, 2021 19:32
@menghanl menghanl added the Type: Internal Cleanup Refactors, etc label Nov 8, 2021
@menghanl menghanl added this to the 1.43 release milestone Nov 8, 2021
@menghanl
Copy link
Contributor Author

menghanl commented Nov 8, 2021

@easwars This PR has a lot of trivial changes caused by moving types between packages.
It should make reviewing easier if you first mark those as reviewed and hide them.

Comment on lines 28 to 32
v, ok := c[s]
if !ok {
return nil
}
return v.Raw
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe? (just saves one line per case, but overall it makes the function shorter).

	if v, ok := c[s]; ok {
		return v.Raw
	}
	return nil

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@easwars easwars assigned menghanl and unassigned easwars Nov 8, 2021
… to a separate struct

- a new pubsub package to manage the watchers
  - it also handles new updates, and calls the watcher callbacks
- move more types to package xdsresource
  - most of the changes in tests and other packages are due to this
  - this is necessary to avoid cycular dependency (xdsclient -> pubsub -> xdsclient's types)
@menghanl menghanl merged commit 59e024e into grpc:master Nov 9, 2021
@menghanl menghanl deleted the xds_client_rafactor_step_2 branch November 9, 2021 18:32
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants