From: Florian Forster Date: Mon, 1 Aug 2016 14:29:00 +0000 (+0200) Subject: grpc plugin: Rename "Reply" messages to "Response". X-Git-Tag: collectd-5.6.0~54^2~7 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=610204218564e01513607a0f077c33145f2b41f7;p=collectd.git grpc plugin: Rename "Reply" messages to "Response". This appears to be the common nomenclature for gRPC. --- diff --git a/proto/collectd.proto b/proto/collectd.proto index 0ed66061..9ea73b2e 100644 --- a/proto/collectd.proto +++ b/proto/collectd.proto @@ -30,12 +30,12 @@ import "types.proto"; service Collectd { // Query a list of values available from collectd's value cache. - rpc QueryValues(QueryValuesRequest) returns (QueryValuesReply); + rpc QueryValues(QueryValuesRequest) returns (QueryValuesResponse); } service Dispatch { // DispatchValues sends a stream of ValueLists to the server. - rpc DispatchValues(stream DispatchValuesRequest) returns (DispatchValuesReply); + rpc DispatchValues(stream DispatchValuesRequest) returns (DispatchValuesResponse); } // The arguments to DispatchValues. @@ -44,7 +44,7 @@ message DispatchValuesRequest { } // The response from DispatchValues. -message DispatchValuesReply { +message DispatchValuesResponse { } // The arguments to QueryValues. @@ -56,6 +56,6 @@ message QueryValuesRequest { } // The response from QueryValues. -message QueryValuesReply { +message QueryValuesResponse { repeated collectd.types.ValueList value_lists = 1; } diff --git a/src/grpc.cc b/src/grpc.cc index ca3314ec..9c4f2589 100644 --- a/src/grpc.cc +++ b/src/grpc.cc @@ -49,9 +49,9 @@ using collectd::Collectd; using collectd::Dispatch; using collectd::DispatchValuesRequest; -using collectd::DispatchValuesReply; +using collectd::DispatchValuesResponse; using collectd::QueryValuesRequest; -using collectd::QueryValuesReply; +using collectd::QueryValuesResponse; using google::protobuf::util::TimeUtil; @@ -260,7 +260,7 @@ static grpc::Status unmarshal_value_list(const collectd::types::ValueList &msg, /* * request call-backs and call objects */ -static grpc::Status DispatchValue(grpc::ServerContext *ctx, DispatchValuesRequest request, DispatchValuesReply *reply) +static grpc::Status DispatchValue(grpc::ServerContext *ctx, DispatchValuesRequest request, DispatchValuesResponse *reply) { value_list_t vl = VALUE_LIST_INIT; auto status = unmarshal_value_list(request.value_list(), &vl); @@ -275,7 +275,7 @@ static grpc::Status DispatchValue(grpc::ServerContext *ctx, DispatchValuesReques return status; } /* grpc::Status DispatchValue */ -static grpc::Status QueryValues(grpc::ServerContext *ctx, QueryValuesRequest req, QueryValuesReply *res) +static grpc::Status QueryValues(grpc::ServerContext *ctx, QueryValuesRequest req, QueryValuesResponse *res) { uc_iter_t *iter; char *name = NULL; @@ -387,8 +387,8 @@ private: grpc::ServerCompletionQueue* cq_; Collectd::AsyncService* service_; QueryValuesRequest request_; - QueryValuesReply response_; - grpc::ServerAsyncResponseWriter writer_; + QueryValuesResponse response_; + grpc::ServerAsyncResponseWriter writer_; }; /* @@ -439,8 +439,8 @@ private: Dispatch::AsyncService* service_; DispatchValuesRequest request_; - DispatchValuesReply response_; - grpc::ServerAsyncReader reader_; + DispatchValuesResponse response_; + grpc::ServerAsyncReader reader_; }; /*