Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc/test: serde_fields for various rpc_gen_types #23124

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/v/rpc/test/rpc_gen_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,37 +45,43 @@ struct echo_req
: serde::envelope<echo_req, serde::version<0>, 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<echo_req, serde::version<0>, 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<echo_req, serde::version<0>, serde::compat_version<0>> {
using rpc_adl_exempt = std::true_type;
uint64_t expected;
auto serde_fields() { return std::tie(expected); }
};

struct cnt_resp
: serde::envelope<echo_req, serde::version<0>, serde::compat_version<0>> {
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<echo_req, serde::version<0>, 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<echo_req, serde::version<0>, 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 };
Expand All @@ -84,12 +90,15 @@ struct throw_req
: serde::envelope<echo_req, serde::version<0>, 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<echo_req, serde::version<0>, 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
Expand Down
Loading