service
Create a proxy client for a Restate service.
This creates a proxy that allows calling service methods directly. The proxy intercepts method calls, converts them to Restate requests, and awaits the result.
Example usage:
@Handler
suspend fun myHandler(): String {
val greeter = service<Greeter>()
val response = greeter.greet("Alice")
return "Got: $response"
}Content copied to clipboard
Return
a proxy client to invoke the service
Parameters
SVC
the service class annotated with @Service