grpc
grpc copied to clipboard
Support access to MethodOptions fields
trafficstars
Is your feature request related to a problem? Please describe. The option field in methods can be used to access contextual information. an example of this would http transcoding:
service ShoppingCart {
rpc AddItem(AddLineItem) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/cart/{user_id}/items/add",
body: "*",
};
option (.cloudstate.eventing).in = "items";
}
rpc RemoveItem(RemoveLineItem) returns (google.protobuf.Empty) {
option (google.api.http).post = "/cart/{user_id}/items/{product_id}/remove";
}
rpc GetCart(GetShoppingCart) returns (Cart) {
option (google.api.http) = {
get: "/carts/{user_id}",
additional_bindings: {
get: "/carts/{user_id}/items",
response_body: "items"
}
};
}
@sleipnir do you want to take this on?
@sleipnir do you want to take this on?
@polvalente I think we can close this one once the options have been added and that @drowzy is developing https://github.com/elixir-grpc/grpc/issues/274 via https://github.com/elixir-grpc/grpc/pull/273