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

Get Routable EngineInstance #3

Open
buschtoens opened this issue Jul 9, 2020 · 1 comment
Open

Get Routable EngineInstance #3

buschtoens opened this issue Jul 9, 2020 · 1 comment

Comments

@buschtoens
Copy link
Collaborator

buschtoens commented Jul 9, 2020

$edb.getEngineInstanceForRoute('some.mount.point') => Promise<EngineInstance>
class EDB {
  async getEngineInstanceForRoute(mountPoint: string): Promise<EngineInstance> {
    const router = this.owner.lookup('router:main');
    const engineApplicationRoute = await router._routerMicrolib.getRoute(mountPoint)
    const engineInstance = getOwner(engineApplicationRoute);
    return engineInstance;
  }
}
@SYU15
Copy link
Member

SYU15 commented Jul 12, 2020

I am wondering if we would even want to abstract it further to get get the routerLib by checking for both router._routerMicrolib and router.router.

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

No branches or pull requests

2 participants