The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#) https://grpc.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.8 KiB

8 years ago
/*
*
* Copyright 2016 gRPC authors.
8 years ago
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
8 years ago
*
* http://www.apache.org/licenses/LICENSE-2.0
8 years ago
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
8 years ago
*
*/
8 years ago
#ifndef GRPCXX_HEALTH_CHECK_SERVICE_INTERFACE_H
#define GRPCXX_HEALTH_CHECK_SERVICE_INTERFACE_H
8 years ago
#include <grpc++/support/config.h>
namespace grpc {
8 years ago
const char kHealthCheckServiceInterfaceArg[] =
"grpc.health_check_service_interface";
8 years ago
8 years ago
/// The gRPC server uses this interface to expose the health checking service
/// without depending on protobuf.
8 years ago
class HealthCheckServiceInterface {
8 years ago
public:
8 years ago
virtual ~HealthCheckServiceInterface() {}
8 years ago
/// Set or change the serving status of the given \a service_name.
8 years ago
virtual void SetServingStatus(const grpc::string& service_name,
bool serving) = 0;
8 years ago
/// Apply to all registered service names.
8 years ago
virtual void SetServingStatus(bool serving) = 0;
};
8 years ago
/// Enable/disable the default health checking service. This applies to all C++
/// servers created afterwards. For each server, user can override the default
/// with a HealthCheckServiceServerBuilderOption.
/// NOT thread safe.
8 years ago
void EnableDefaultHealthCheckService(bool enable);
8 years ago
8 years ago
/// Returns whether the default health checking service is enabled.
8 years ago
/// NOT thread safe.
8 years ago
bool DefaultHealthCheckServiceEnabled();
8 years ago
} // namespace grpc
8 years ago
#endif // GRPCXX_HEALTH_CHECK_SERVICE_INTERFACE_H