-
Notifications
You must be signed in to change notification settings - Fork 37
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
rsocket-kotlin-scripting target #128
Comments
All other are just transitive dependencies
HttpClient {
install(WebSockets)
install(RSocketSupport)
} Engine will be auto-defined on JVM, and
fun RSocketHttpClient(block: RSocketConnectorBuilder.() -> Unit): HttpClient = HttpClient {
install(WebSockets)
install(RSocketSupport) {
connector = RSocketConnector(block)
}
}
val client = RSocketHttpClient {
connectionConfig {
payloadMimeType = config.payloadMimeType
}
}
|
For 2 the goal here isn't to knowingly configure Ktor. It's to achieve some scripting like task against rsocket APIs as a client or server. |
So the suggestion is a scripting library that combines some minimal set of common dependencies from 1. with the utility you defined in 2
Get the overall script down to
|
Any objection if I put up a sample PR for debate? |
As I'm not as familiar with the code structure. Dependencies and imports and configuration is making even quite simple examples quite involved to quickly create and iterate on. |
yes! That's what I was thinking to ask you |
With future serialisation support (#112) such scripting functionality will be better than testing APIs through some CLI. Really look forward on it! |
I'm unlikely to take the on any time soon, so closing off https://gist.github.com/yschimke/9b5d36790478a37776c97b7a73331578 |
Let's leave it open for now, I can take it on my own some time in future, no hurry. I think, that scripting examples, experience - it's a great opportunity to share even simple rsocket clients / servers in one script, so anyone could try it out |
The rocket-cli command for the server above is
|
What could we do to optimise the kotlin scripting experience?
https://github.com/yschimke/okurl-scripts/blob/master/commands/rsocketTcpProxy.main.kts
Collapse the DependsOn to a single line
The text was updated successfully, but these errors were encountered: