thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aditya Sarawgi <adityasarawgi...@gmail.com>
Subject Re: Thrift optional type for rpc response
Date Wed, 20 Nov 2013 22:08:13 GMT
The language is cpp.


On Wed, Nov 20, 2013 at 12:53 AM, Aditya Sarawgi <adityasarawgioo7@gmail.com
> wrote:

> Hi Everyone,
>
> I have some questions about the way I am using thrift optional types or
> rather I am not sure if this is the right way to use it. The thrift file
> looks something like this
>
> namespace something
>
> struct Response {
>  1: Status status,
>  2: optional list<string> msgs
>
> }
>
> service Something {
>   Respone getMessages(1: i16 id)
> }
>
> Now first of all I am confused by the following
>
> 1) Should optional be ever used in a response
> 2) If doesn't return the msgs until I do a
> _return.__set_msgs(vector_of_msgs) which looks hacky to me.
>
> Any guidance on this is much appreciated, the documentation is really
> sparse.
>
> Thanks
> Aditya Sarawgi
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message