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

[Prospective] MNT: consolidate different Entry traversal use cases in Visitor #106

Open
shilorigins opened this issue Nov 15, 2024 · 1 comment
Assignees

Comments

@shilorigins
Copy link
Collaborator

We re-implement the logic of traversing an Entry graph multiple times in our codebase, performing a different action at each node or tracking different metadata. These use cases could potentially be streamlined by implementing an EntryVisitor class containing the common logic, with subclasses performing the different specific functions.

Possible visitor subclasses:

  • FillUUIDVisitor
  • SearchVisitor (for FilestoreBackend / TestBackend)
  • SnapVisitor
@shilorigins shilorigins self-assigned this Nov 15, 2024
@tangkong
Copy link
Contributor

tangkong commented Nov 15, 2024

Or possibly a visitor + post-visit hook structure? I realize that's the normal way you handle graph/tree traversal in school

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants