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

move the plugin interface into scorch #1507

Merged
merged 3 commits into from
Dec 2, 2020

Conversation

mschoch
Copy link
Contributor

@mschoch mschoch commented Nov 30, 2020

No description provided.

@mschoch
Copy link
Contributor Author

mschoch commented Nov 30, 2020

NOTE: this will fail until we point to versions with all the other changes merged/tagged, but let's you see the complete picture

@mschoch
Copy link
Contributor Author

mschoch commented Nov 30, 2020

NOTE: this will fail until we point to versions with all the other changes merged/tagged, but let's you see the complete picture

Actually I see now that it won't fail, but will in some intermediate states once the segment.Plugin is removed. Anyway, hopefully you see where this is going.

var defaultSegmentPlugin segment.Plugin
// Plugin represents the essential functions required by a package to plug in
// it's segment implementation
type Plugin interface {
Copy link
Contributor

Choose a reason for hiding this comment

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

Feels like this name Plugin becomes a very generic name now, without leaving any clues?
Any thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Originally I was going make it not exported, but we use it as an argument to the RegisterPlugin method. We could change it to SegmentPlugin. But, then should also change the method names to match?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alternatively, if you don't like Plugin at all, maybe SegmentImplementation? That ends up kind of long, and SegmentImpl feels very much like a Java name...

Copy link
Contributor

Choose a reason for hiding this comment

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

I liked SegmentPlugin though. .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I will go with SegmentPlugin, do you think the method names should change as well?

RegisterPlugin -> RegisterSegmentPlugin
ResetPlugins -> ResetSegmentPlugins

Copy link
Contributor

@sreekanth-cb sreekanth-cb left a comment

Choose a reason for hiding this comment

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

.

* update to make all analysis take place in func()

by making analysis take place inside a func() a
closure can be used to encapsulate all the index
specific details.  this allows the index API to not
know about scorch vs upsidedown analysis structures

* rewrite variable declaration for clarity

also update comment, per review feedback

* update to latest versions

selects latest versions compatible with these changes
@mschoch mschoch merged commit cf6396d into fix-circular-deps Dec 2, 2020
@mschoch mschoch deleted the make-plugin-interface-local branch December 2, 2020 16:23
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

Successfully merging this pull request may close these issues.

2 participants