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

add ready? method to new plugin api #3885

Open
colinsurprenant opened this issue Sep 8, 2015 · 0 comments
Open

add ready? method to new plugin api #3885

colinsurprenant opened this issue Sep 8, 2015 · 0 comments
Labels

Comments

@colinsurprenant
Copy link
Contributor

as proposed/discussed in elastic/logstash-devutils#32 and #3812 (now #3895) I am moving here the discussion about potentially introducing a new ready? method which would mainly help for testing to know when the plugin is ready and we can call the stop method on it.

there are a few things we should consider:

  • it seems this new ready? method would only be used for tests/specs, in which case, is it really needed in a public api?
  • it is hard de define the exact semantic of ready, is it ready once register has been called? or when the run method has been called? or when run has completed some internal initialization?
  • in any cases, the stop method should always be callable after register has been called
  • would the equivalent of the stop / stop? be sufficient? instead of a ready? we could just have a threadsaferun? method that just returns true when the run method has been called?

thoughts?

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

No branches or pull requests

2 participants