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 Generator for RegisterServices #17

Merged
merged 1 commit into from
Apr 11, 2021

Conversation

zeripath
Copy link

This PR adds a reusable services generator that will create an init import file.

Signed-off-by: Andrew Thornton art27@cantab.net

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath
Copy link
Author

So the generated file probably should be .gitignored

And we may need to make the generator a little bit more general to permit passing in the base package name.

It may also need some globbing support to make the excludes and includes a bit better too.

However it's pretty usable as is.

What's really interesting is the possibilities for this beyond this use.

modules/queue could be restructered with that directory simply containing the interfaces and a registry of known implementations. The manager would be moved to manager along with a generated provider importer, and the providers all within their own directories and so on

@lunny lunny merged this pull request into lunny:lunny/services Apr 11, 2021
@zeripath zeripath deleted the lunny-services-generate branch April 11, 2021 06:46
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