summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d26dd5c)
raw | patch | inline | side by side (parent: d26dd5c)
author | Florian Forster <octo@collectd.org> | |
Mon, 1 Aug 2016 14:29:00 +0000 (16:29 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Tue, 2 Aug 2016 14:56:58 +0000 (16:56 +0200) |
This appears to be the common nomenclature for gRPC.
proto/collectd.proto | patch | blob | history | |
src/grpc.cc | patch | blob | history |
diff --git a/proto/collectd.proto b/proto/collectd.proto
index 0ed6606171c37e4359ebe335771ac64f22d5bf7d..9ea73b2e9e85f87bc0deb8caf0449d30936a96b7 100644 (file)
--- a/proto/collectd.proto
+++ b/proto/collectd.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.
}
// The response from DispatchValues.
-message DispatchValuesReply {
+message DispatchValuesResponse {
}
// The arguments to QueryValues.
}
// 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 ca3314ecf10cf743828d076c79b4e2217968fc91..9c4f2589f53289b0ce9df592ddc0be23db175508 100644 (file)
--- a/src/grpc.cc
+++ b/src/grpc.cc
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;
/*
* 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;
grpc::ServerCompletionQueue* cq_;
Collectd::AsyncService* service_;
QueryValuesRequest request_;
- QueryValuesReply response_;
- grpc::ServerAsyncResponseWriter<QueryValuesReply> writer_;
+ QueryValuesResponse response_;
+ grpc::ServerAsyncResponseWriter<QueryValuesResponse> writer_;
};
/*
Dispatch::AsyncService* service_;
DispatchValuesRequest request_;
- DispatchValuesReply response_;
- grpc::ServerAsyncReader<DispatchValuesReply, DispatchValuesRequest> reader_;
+ DispatchValuesResponse response_;
+ grpc::ServerAsyncReader<DispatchValuesResponse, DispatchValuesRequest> reader_;
};
/*