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

feat: retrieve routers from composable routers #68

Merged
merged 3 commits into from
Jan 12, 2023

Conversation

ajnavarro
Copy link
Member

This is useful when you want to access specific features or metrics needed per router, like get DHT stats.

Signed-off-by: Antonio Navarro antnavper@gmail.com

This is useful when you want to access specific features or metrics needed per router, like get DHT stats.

Signed-off-by: Antonio Navarro <antnavper@gmail.com>
@lidel lidel changed the title Feat: retrieve routers from composable routers feat: retrieve routers from composable routers Jan 12, 2023
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm as a quick way to unblock ipfs/kubo#9482, feel free to merge after addressing small asks in comments inline.

ps . (not a blocker, could be future PR) I wonder if it is I think it may be also useful to have separate funcs below (but can be future PR), which allows reading wrapper router attribites like things like Timeout or ExecureAfter

func (r *composableParallel) ParallelRouters() []*ParallelRouter {
  return r.routers
}
func (r *composableSequential) SequentialRouters() []*SequentialRouter {
  return r.routers
}

compconfig.go Outdated Show resolved Hide resolved
compsequential_test.go Show resolved Hide resolved
Signed-off-by: Antonio Navarro <antnavper@gmail.com>
@ajnavarro ajnavarro merged commit 464687d into master Jan 12, 2023
This pull request was closed.
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