Better example. A method to request for exacly one element from the gRPC bistream. A thing that is frequently needed when there're lots of bistream gRPC methods.
IRL I would need to call it as
resp, err := proto.ReadOne(service.Service_MethodClient, service.MethodRequest, service.MethodResponse)(ctx, client.Method, &service.MethodRequest{
…
})
instead of simple to read
resp, err := proto.ReadOne(ctx, client.Method, &service.MethodRequest{
…
})
среда, 17 июня 2020 г., 19:43:35 UTC+3 пользователь Denis Cheremisov написал: