-
Notifications
You must be signed in to change notification settings - Fork 10
Ingress Client #33
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
Comments
Any chance that we'll get this soon? |
Hi, currently I'm not planning to work on this feature, but I accept contributions. In Restate 1.2 (releasing this week) you'll be able to get the OpenAPI of a service, and that can be used to generate a client with any openapi generator. I was just adding the documentation about it: restatedev/documentation#521 |
I was looking into this, but I'm not sure if my approach makes sense. In my attempt, I created a trait to abstract between a pub(crate) struct MyObjectClient<'client, T: Client> {
client: &'client T,
key: String,
} But this introduces a breaking change and a bit of an ergonomic hit when creating a client (notice the let client = ctx.object_client::<MyObjectClient<_>>("my-key"); What do you think of this approach? Would this be acceptable? Or do you think that the macro should instead generate two separate types of clients, a context and an ingress one? |
I think eventually the macro should generate two clients, because the return types of the methods will be different. The futures returned by the context methods will change at some point, and they will all implement a custom subtrait of |
Something like this, so that handlers can be invoked from places with no access to ctx.
The text was updated successfully, but these errors were encountered: