Seastar
High performance C++ framework for concurrent servers
|
Used to return multiple values in rpc without variadic futures
If you wish to return multiple values from an rpc procedure, use a signature future<rpc::tuple<return type list> (argument list)>>
. This will be marshalled by rpc, so you do not need to have your Serializer serialize/deserialize this tuple type. The serialization format is compatible with the deprecated variadic future support, and is compatible with adding new return types in a backwards compatible way provided new parameters are appended only, and wrapped with rpc::optional: future<rpc::tuple<existing return type list, rpc::optional<new_return_type>>> (argument list)
You may also use another tuple type, such as std::tuple. In this case, your Serializer type must recognize your tuple type and provide serialization and deserialization for it.
#include <seastar/rpc/rpc_types.hh>
Public Member Functions | |
tuple (std::tuple< T... > &&x) | |