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

Easier side effect services #83

Open
zoe-codez opened this issue Oct 6, 2024 · 0 comments
Open

Easier side effect services #83

zoe-codez opened this issue Oct 6, 2024 · 0 comments
Labels

Comments

@zoe-codez
Copy link
Member

zoe-codez commented Oct 6, 2024

🪤 Context

services is the wrong tool for loading services that should be self contained service consumers - It adds types to TServiceParams with and the matching logic for actually providing those.

In a situation where I want to create a controller, these will never be used the same way as a service, it the control is intended to go the other direction. The context is still important (for setting up logs), but it doesn't need to be specific

🩻 Additional details

  • always: construct AFTER all services are built
    • order is not guaranteed / shouldn't matter
  • never: get provided to service definitions (types or actual values)
const module = CreateApplication/CreateLibrary({
  name: "example",
  internals: { 
    // ... see other issue
  },
  services: {
    // ... regular logic
  },


  // new block
  effect: {
    // more service functions
  }
});
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

1 participant