-
Notifications
You must be signed in to change notification settings - Fork 0
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 ability to retreive grpc service instance from context #21
Conversation
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.
Please also bump version and update changelog in readme
@@ -32,6 +33,7 @@ class HandlerContext( | |||
private val channelFactory: ChannelFactory, | |||
private val getDictionary: (DictionaryType) -> InputStream, | |||
private val sendEvent: (Event) -> Unit, | |||
private val grpcRouter: GrpcRouter |
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.
Let's pass a method reference instead of the whole router
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.
How? We don't have common interface for service classes
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.
How?
We can do smth like this, but we'll have to do an unchecked cast later
private val grpcRouter: GrpcRouter | |
private val getService: (Class<out Any>) -> Any |
@@ -32,6 +33,7 @@ class HandlerContext( | |||
private val channelFactory: ChannelFactory, | |||
private val getDictionary: (DictionaryType) -> InputStream, | |||
private val sendEvent: (Event) -> Unit, | |||
private val grpcRouter: GrpcRouter |
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.
How?
We can do smth like this, but we'll have to do an unchecked cast later
private val grpcRouter: GrpcRouter | |
private val getService: (Class<out Any>) -> Any |
Co-authored-by: Ivan Druzhinin <[email protected]>
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.
Please merge with squash
No description provided.