thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aditya Sarawgi <adityasarawgi...@gmail.com>
Subject Thrift optional type for rpc response
Date Wed, 20 Nov 2013 08:53:11 GMT
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