From 58a68e415ed2140d278d2b67a8027ede7cbe4f65 Mon Sep 17 00:00:00 2001 From: Oren Leiman Date: Wed, 7 Aug 2024 16:06:38 -0700 Subject: [PATCH] rpc/test: serde_fields for various rpc_gen_types Signed-off-by: Oren Leiman --- src/v/rpc/test/rpc_gen_types.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/v/rpc/test/rpc_gen_types.h b/src/v/rpc/test/rpc_gen_types.h index 7ca9debccd716..6437fef4c73e0 100644 --- a/src/v/rpc/test/rpc_gen_types.h +++ b/src/v/rpc/test/rpc_gen_types.h @@ -45,18 +45,21 @@ struct echo_req : serde::envelope, serde::compat_version<0>> { using rpc_adl_exempt = std::true_type; ss::sstring str; + auto serde_fields() { return std::tie(str); } }; struct echo_resp : serde::envelope, serde::compat_version<0>> { using rpc_adl_exempt = std::true_type; ss::sstring str; + auto serde_fields() { return std::tie(str); } }; struct cnt_req : serde::envelope, serde::compat_version<0>> { using rpc_adl_exempt = std::true_type; uint64_t expected; + auto serde_fields() { return std::tie(expected); } }; struct cnt_resp @@ -64,18 +67,21 @@ struct cnt_resp using rpc_adl_exempt = std::true_type; uint64_t expected; uint64_t current; + auto serde_fields() { return std::tie(expected, current); } }; struct sleep_req : serde::envelope, serde::compat_version<0>> { using rpc_adl_exempt = std::true_type; uint64_t secs; + auto serde_fields() { return std::tie(secs); } }; struct sleep_resp : serde::envelope, serde::compat_version<0>> { using rpc_adl_exempt = std::true_type; ss::sstring str; + auto serde_fields() { return std::tie(str); } }; enum class failure_type { throw_exception, exceptional_future, none }; @@ -84,12 +90,15 @@ struct throw_req : serde::envelope, serde::compat_version<0>> { using rpc_adl_exempt = std::true_type; failure_type type; + auto serde_fields() { return std::tie(type); } }; struct throw_resp : serde::envelope, serde::compat_version<0>> { using rpc_adl_exempt = std::true_type; ss::sstring reply; + + auto serde_fields() { return std::tie(reply); } }; struct echo_req_serde_only