-
Notifications
You must be signed in to change notification settings - Fork 3
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 extendable controller & configuration for setup #28
Conversation
8c83b9d
to
7d37fac
Compare
7d37fac
to
9e3bd3c
Compare
fec731e
to
8e0df9d
Compare
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.
This is fine for now.
The idea of #27 is that there will be a serve
function that will handle all the routes, and also take the Inngest
client as an input so the route handler will have all the information it needs.
Having some compilation error locally, so haven't push the latest code up yet.
this is the latest code, and kotlin is not happy about something, but can't tell what it is. |
oh it was the Kotlin paratrooped |
I think someone with better spring boot knowledge can shape a better interface to create the inngest client + CommHandler but this is already better than manually creating a singleton and having everything in a random controller. Note: It might be better to not have a second adapter package and instead have these spring boot helpers as a feature variant. But I'll see how it goes with this PR first: #27 I'm also adding a way to build the Inngest client configuration possibly through a Builder pattern targeted to the specific environment that the user wants to use.
8e0df9d
to
875fbef
Compare
yeah, I just figured it out. annoying |
} | ||
|
||
group = "com.inngest" | ||
version = "0.0.1-SNAPSHOT" |
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.
probably best to version all the subpackages of inngest-kt
together. I think there's something we can add in the root gradle file. I'll take a note of this for now
|
||
import com.inngest.*; | ||
import com.inngest.springboot.InngestConfiguration; | ||
import kotlin.jvm.functions.Function2; |
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.
we already discussed this but probably ideal if we don't have to pull in a kotlin Function here and can instead use lambdas (available in Java 8) or something like https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html
I think someone with better spring boot knowledge can shape
a better interface to create the Inngest client +
CommHandler
butthis is already better than manually creating a singleton and
having everything in a random controller.
Note: It might be better to not have a second adapter package and
instead have these spring boot helpers as a feature variant. But
I'll see how it goes with this PR first: #27
I'm also adding a way to build the Inngest client configuration
possibly through a Builder pattern targeted to the specific
environment that the user wants to use.
The current interface (which needs better code documentation) is that a consumer application would subclass the controller and configuration as follows:
ExampleController.java
ExampleConfiguration.java