-
Notifications
You must be signed in to change notification settings - Fork 18
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
chore(refactor): move node logic to the node package #533
Conversation
Is this supposed to be part of v0.8 or some other release? |
Signed-off-by: mudler <[email protected]>
the earlier the better! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moving to the "node" package makes good sense. The update is straightforward. Everything looks good. I see plans for improving the organization of Protocol handlers. I love it!
commit 4940215 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Sep 18 19:47:58 2024 +0200 build(deps): bump github.com/ollama/ollama from 0.3.9 to 0.3.11 (#558) Bumps [github.com/ollama/ollama](https://github.com/ollama/ollama) from 0.3.9 to 0.3.11. - [Release notes](https://github.com/ollama/ollama/releases) - [Commits](ollama/ollama@v0.3.9...v0.3.11) --- updated-dependencies: - dependency-name: github.com/ollama/ollama dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit b3022cc Author: Ettore Di Giacinto <[email protected]> Date: Wed Sep 18 16:16:09 2024 +0200 chore(ci): rename gosec workflow Signed-off-by: Ettore Di Giacinto <[email protected]> commit 7afe67f Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Sep 17 17:46:35 2024 +0200 build(deps): bump github.com/gotd/td from 0.108.0 to 0.110.0 (#555) Bumps [github.com/gotd/td](https://github.com/gotd/td) from 0.108.0 to 0.110.0. - [Release notes](https://github.com/gotd/td/releases) - [Commits](gotd/td@v0.108.0...v0.110.0) --- updated-dependencies: - dependency-name: github.com/gotd/td dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit d2a7aef Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Sep 17 17:46:16 2024 +0200 build(deps): bump github.com/sashabaranov/go-openai from 1.29.1 to 1.29.2 (#554) build(deps): bump github.com/sashabaranov/go-openai Bumps [github.com/sashabaranov/go-openai](https://github.com/sashabaranov/go-openai) from 1.29.1 to 1.29.2. - [Release notes](https://github.com/sashabaranov/go-openai/releases) - [Commits](sashabaranov/go-openai@v1.29.1...v1.29.2) --- updated-dependencies: - dependency-name: github.com/sashabaranov/go-openai dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Untie blockchain as a singleton, make it possible to create more instances - Allow to add protocols from the MasaOracle - Untie worker manager and avoid singleton Signed-off-by: mudler <[email protected]>
- Untie config from viper business logics - Now options are consistently used inside the node rather the config singletons - Reduce usage of config's singleton - Generate options from Viper configuration - Attach services to main node business logic to start up services Signed-off-by: mudler <[email protected]>
Description
This PR contains some small refactoring. My objective is to run tests for the blockchain, and in order to do this, I need to move from the
main
the handler registration such as can be re-used when starting the node inside the tests.Changes breakdown:
pkg/
into it's ownnode/
package (the masa oracle node).AppOption
for injecting generic "handlers" and "services" - in order to force the future code to use that structure instead of being loosely handled.config
as singleton in favor ofAppOptions
AppOptions
to NodeAppOptions
to set services and handlersThis is still WIP, however could be merged as-is for now. The only drawback is that I haven't had the time to migrate yet current handlers and services to the new structure, and didn't moved things out of main yet.
Notes for Reviewers
Signed commits