aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2016-12-01 11:53:08 -0800
committerGravatar yang-g <yangg@google.com>2016-12-27 15:37:59 -0800
commit0498124f8ebead73d71fefdfc63e9b29d0da7a8f (patch)
tree961e74d001280388d4ffea444a727371002291ed
parent22b28264f9242b6d049f9e6d5b792bd5be048a97 (diff)
Add files
-rw-r--r--BUILD6
-rw-r--r--CMakeLists.txt6
-rw-r--r--Makefile6
-rw-r--r--build.yaml2
-rw-r--r--include/grpc++/ext/health_check_service_interface.h52
-rw-r--r--include/grpc++/ext/health_check_service_server_builder_option.h56
-rw-r--r--tools/doxygen/Doxyfile.c++2
-rw-r--r--tools/doxygen/Doxyfile.c++.internal2
-rw-r--r--tools/run_tests/generated/sources_and_headers.json4
-rw-r--r--vsprojects/vcxproj/grpc++/grpc++.vcxproj2
-rw-r--r--vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters9
-rw-r--r--vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj2
-rw-r--r--vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters9
13 files changed, 158 insertions, 0 deletions
diff --git a/BUILD b/BUILD
index ab0fc237b7..54eda959fc 100644
--- a/BUILD
+++ b/BUILD
@@ -1422,6 +1422,8 @@ cc_library(
"include/grpc++/completion_queue.h",
"include/grpc++/create_channel.h",
"include/grpc++/create_channel_posix.h",
+ "include/grpc++/ext/health_check_service_interface.h",
+ "include/grpc++/ext/health_check_service_server_builder_option.h",
"include/grpc++/generic/async_generic_service.h",
"include/grpc++/generic/generic_stub.h",
"include/grpc++/grpc++.h",
@@ -1884,6 +1886,8 @@ cc_library(
"include/grpc++/completion_queue.h",
"include/grpc++/create_channel.h",
"include/grpc++/create_channel_posix.h",
+ "include/grpc++/ext/health_check_service_interface.h",
+ "include/grpc++/ext/health_check_service_server_builder_option.h",
"include/grpc++/generic/async_generic_service.h",
"include/grpc++/generic/generic_stub.h",
"include/grpc++/grpc++.h",
@@ -2060,6 +2064,8 @@ cc_library(
"include/grpc++/completion_queue.h",
"include/grpc++/create_channel.h",
"include/grpc++/create_channel_posix.h",
+ "include/grpc++/ext/health_check_service_interface.h",
+ "include/grpc++/ext/health_check_service_server_builder_option.h",
"include/grpc++/generic/async_generic_service.h",
"include/grpc++/generic/generic_stub.h",
"include/grpc++/grpc++.h",
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff0927504a..90cf1cdc77 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1128,6 +1128,8 @@ foreach(_hdr
include/grpc++/completion_queue.h
include/grpc++/create_channel.h
include/grpc++/create_channel_posix.h
+ include/grpc++/ext/health_check_service_interface.h
+ include/grpc++/ext/health_check_service_server_builder_option.h
include/grpc++/generic/async_generic_service.h
include/grpc++/generic/generic_stub.h
include/grpc++/grpc++.h
@@ -1461,6 +1463,8 @@ foreach(_hdr
include/grpc++/completion_queue.h
include/grpc++/create_channel.h
include/grpc++/create_channel_posix.h
+ include/grpc++/ext/health_check_service_interface.h
+ include/grpc++/ext/health_check_service_server_builder_option.h
include/grpc++/generic/async_generic_service.h
include/grpc++/generic/generic_stub.h
include/grpc++/grpc++.h
@@ -1667,6 +1671,8 @@ foreach(_hdr
include/grpc++/completion_queue.h
include/grpc++/create_channel.h
include/grpc++/create_channel_posix.h
+ include/grpc++/ext/health_check_service_interface.h
+ include/grpc++/ext/health_check_service_server_builder_option.h
include/grpc++/generic/async_generic_service.h
include/grpc++/generic/generic_stub.h
include/grpc++/grpc++.h
diff --git a/Makefile b/Makefile
index 8f7328ae28..85074b5b81 100644
--- a/Makefile
+++ b/Makefile
@@ -3805,6 +3805,8 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/completion_queue.h \
include/grpc++/create_channel.h \
include/grpc++/create_channel_posix.h \
+ include/grpc++/ext/health_check_service_interface.h \
+ include/grpc++/ext/health_check_service_server_builder_option.h \
include/grpc++/generic/async_generic_service.h \
include/grpc++/generic/generic_stub.h \
include/grpc++/grpc++.h \
@@ -4167,6 +4169,8 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/completion_queue.h \
include/grpc++/create_channel.h \
include/grpc++/create_channel_posix.h \
+ include/grpc++/ext/health_check_service_interface.h \
+ include/grpc++/ext/health_check_service_server_builder_option.h \
include/grpc++/generic/async_generic_service.h \
include/grpc++/generic/generic_stub.h \
include/grpc++/grpc++.h \
@@ -4700,6 +4704,8 @@ PUBLIC_HEADERS_CXX += \
include/grpc++/completion_queue.h \
include/grpc++/create_channel.h \
include/grpc++/create_channel_posix.h \
+ include/grpc++/ext/health_check_service_interface.h \
+ include/grpc++/ext/health_check_service_server_builder_option.h \
include/grpc++/generic/async_generic_service.h \
include/grpc++/generic/generic_stub.h \
include/grpc++/grpc++.h \
diff --git a/build.yaml b/build.yaml
index de9d253ef1..25c4dd7fbf 100644
--- a/build.yaml
+++ b/build.yaml
@@ -718,6 +718,8 @@ filegroups:
- include/grpc++/completion_queue.h
- include/grpc++/create_channel.h
- include/grpc++/create_channel_posix.h
+ - include/grpc++/ext/health_check_service_interface.h
+ - include/grpc++/ext/health_check_service_server_builder_option.h
- include/grpc++/generic/async_generic_service.h
- include/grpc++/generic/generic_stub.h
- include/grpc++/grpc++.h
diff --git a/include/grpc++/ext/health_check_service_interface.h b/include/grpc++/ext/health_check_service_interface.h
new file mode 100644
index 0000000000..b9f4ebb87f
--- /dev/null
+++ b/include/grpc++/ext/health_check_service_interface.h
@@ -0,0 +1,52 @@
+/*
+ *
+ * Copyright 2016, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef GRPCXX_EXT_HEALTH_CHECK_SERVICE_INTERFACE_H
+#define GRPCXX_EXT_HEALTH_CHECK_SERVICE_INTERFACE_H
+
+#include <grpc++/support/config.h>
+
+namespace grpc {
+
+class HealthCheckServiceInterface {
+ public:
+ virtual ~HealthCheckServiceInterface() { }
+ virtual void SetServingStatus(const grpc::string& service_name, bool serving) = 0;
+ // Apply to all registered service names.
+ virtual void SetServingStatus(bool serving) = 0;
+};
+
+
+} // namespace grpc
+
+#endif // GRPCXX_EXT_HEALTH_CHECK_SERVICE_INTERFACE_H
diff --git a/include/grpc++/ext/health_check_service_server_builder_option.h b/include/grpc++/ext/health_check_service_server_builder_option.h
new file mode 100644
index 0000000000..9da1d18c98
--- /dev/null
+++ b/include/grpc++/ext/health_check_service_server_builder_option.h
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright 2016, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef GRPCXX_EXT_HEALTH_CHECK_SERVICE_SERVER_BUILDER_OPTION_H
+#define GRPCXX_EXT_HEALTH_CHECK_SERVICE_SERVER_BUILDER_OPTION_H
+
+#include <memory>
+
+#include <grpc++/support/config.h>
+
+namespace grpc {
+
+class HealthCheckServiceInterface;
+
+class HealthCheckServiceServerBuilderOption : public ServerBuilderOption {
+ public:
+ explicit HealthCheckServiceServerBuilderOption(
+ std::unique_ptr<HealthCheckServiceInterface> hc);
+ void UpdateArguments(ChannelArguments* args) override;
+ private:
+ std::unique_ptr<HealthCheckServiceInterface> hc_;
+};
+
+} // namespace grpc
+
+#endif // GRPCXX_EXT_HEALTH_CHECK_SERVICE_SERVER_BUILDER_OPTION_H
diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++
index ff3a0e381d..77e9c7fc9a 100644
--- a/tools/doxygen/Doxyfile.c++
+++ b/tools/doxygen/Doxyfile.c++
@@ -766,6 +766,8 @@ include/grpc++/client_context.h \
include/grpc++/completion_queue.h \
include/grpc++/create_channel.h \
include/grpc++/create_channel_posix.h \
+include/grpc++/ext/health_check_service_interface.h \
+include/grpc++/ext/health_check_service_server_builder_option.h \
include/grpc++/generic/async_generic_service.h \
include/grpc++/generic/generic_stub.h \
include/grpc++/grpc++.h \
diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal
index 04e8f4e7f2..f2e871e7bd 100644
--- a/tools/doxygen/Doxyfile.c++.internal
+++ b/tools/doxygen/Doxyfile.c++.internal
@@ -766,6 +766,8 @@ include/grpc++/client_context.h \
include/grpc++/completion_queue.h \
include/grpc++/create_channel.h \
include/grpc++/create_channel_posix.h \
+include/grpc++/ext/health_check_service_interface.h \
+include/grpc++/ext/health_check_service_server_builder_option.h \
include/grpc++/generic/async_generic_service.h \
include/grpc++/generic/generic_stub.h \
include/grpc++/grpc++.h \
diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json
index 6ae269cc20..4fd90ed24e 100644
--- a/tools/run_tests/generated/sources_and_headers.json
+++ b/tools/run_tests/generated/sources_and_headers.json
@@ -7618,6 +7618,8 @@
"include/grpc++/completion_queue.h",
"include/grpc++/create_channel.h",
"include/grpc++/create_channel_posix.h",
+ "include/grpc++/ext/health_check_service_interface.h",
+ "include/grpc++/ext/health_check_service_server_builder_option.h",
"include/grpc++/generic/async_generic_service.h",
"include/grpc++/generic/generic_stub.h",
"include/grpc++/grpc++.h",
@@ -7670,6 +7672,8 @@
"include/grpc++/completion_queue.h",
"include/grpc++/create_channel.h",
"include/grpc++/create_channel_posix.h",
+ "include/grpc++/ext/health_check_service_interface.h",
+ "include/grpc++/ext/health_check_service_server_builder_option.h",
"include/grpc++/generic/async_generic_service.h",
"include/grpc++/generic/generic_stub.h",
"include/grpc++/grpc++.h",
diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj
index f281db72b6..b8d4176f8a 100644
--- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj
+++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj
@@ -264,6 +264,8 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\completion_queue.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\create_channel.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\create_channel_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\health_check_service_interface.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\health_check_service_server_builder_option.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\generic\async_generic_service.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\generic\generic_stub.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\grpc++.h" />
diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters
index f359e4ef31..b7eae651bd 100644
--- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters
@@ -132,6 +132,12 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\create_channel_posix.h">
<Filter>include\grpc++</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\health_check_service_interface.h">
+ <Filter>include\grpc++\ext</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\health_check_service_server_builder_option.h">
+ <Filter>include\grpc++\ext</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\generic\async_generic_service.h">
<Filter>include\grpc++\generic</Filter>
</ClInclude>
@@ -416,6 +422,9 @@
<Filter Include="include\grpc++">
<UniqueIdentifier>{784a0281-f547-aeb0-9f55-b26b7de9c769}</UniqueIdentifier>
</Filter>
+ <Filter Include="include\grpc++\ext">
+ <UniqueIdentifier>{25501d8e-5fae-2fe4-14a6-d69a07acefdd}</UniqueIdentifier>
+ </Filter>
<Filter Include="include\grpc++\generic">
<UniqueIdentifier>{51dae921-3aa2-1976-2ee4-c5615de1af54}</UniqueIdentifier>
</Filter>
diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj
index 1511a2cfe4..4b6d448f91 100644
--- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj
+++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj
@@ -264,6 +264,8 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\completion_queue.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\create_channel.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\create_channel_posix.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\health_check_service_interface.h" />
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\health_check_service_server_builder_option.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\generic\async_generic_service.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\generic\generic_stub.h" />
<ClInclude Include="$(SolutionDir)\..\include\grpc++\grpc++.h" />
diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters
index bed77b25a4..deec6d7105 100644
--- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters
@@ -117,6 +117,12 @@
<ClInclude Include="$(SolutionDir)\..\include\grpc++\create_channel_posix.h">
<Filter>include\grpc++</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\health_check_service_interface.h">
+ <Filter>include\grpc++\ext</Filter>
+ </ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\include\grpc++\ext\health_check_service_server_builder_option.h">
+ <Filter>include\grpc++\ext</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\include\grpc++\generic\async_generic_service.h">
<Filter>include\grpc++\generic</Filter>
</ClInclude>
@@ -389,6 +395,9 @@
<Filter Include="include\grpc++">
<UniqueIdentifier>{eceb50c0-bb49-3812-b6bd-b0af6df81da7}</UniqueIdentifier>
</Filter>
+ <Filter Include="include\grpc++\ext">
+ <UniqueIdentifier>{e6643be2-2b2f-953d-ab14-27d89c835c8a}</UniqueIdentifier>
+ </Filter>
<Filter Include="include\grpc++\generic">
<UniqueIdentifier>{83717d3c-57d9-2bfa-ed9c-2b08f86da12b}</UniqueIdentifier>
</Filter>