-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuiltin_service_impl.h
More file actions
70 lines (53 loc) · 2.47 KB
/
builtin_service_impl.h
File metadata and controls
70 lines (53 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Copyright (c) 2014 The Trident Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
//
#ifndef _TRIDENT_BUILTIN_SERVICE_IMPL_H_
#define _TRIDENT_BUILTIN_SERVICE_IMPL_H_
#include <trident/common_internal.h>
#include <trident/builtin_service.pb.h>
namespace trident {
namespace builtin {
class BuiltinServiceImpl : public BuiltinService {
public:
BuiltinServiceImpl(const RpcServerImplWPtr& rpc_server,
const ServicePoolWPtr& service_pool,
bool disable_list_service = false);
virtual ~BuiltinServiceImpl();
virtual void Health(::google::protobuf::RpcController* controller,
const ::trident::builtin::HealthRequest* request,
::trident::builtin::HealthResponse* response,
::google::protobuf::Closure* done);
virtual void ServerOptions(::google::protobuf::RpcController* controller,
const ::trident::builtin::ServerOptionsRequest* request,
::trident::builtin::ServerOptionsResponse* response,
::google::protobuf::Closure* done);
virtual void UpdateOptions(::google::protobuf::RpcController* controller,
const ::trident::builtin::UpdateOptionsRequest* request,
::trident::builtin::UpdateOptionsResponse* response,
::google::protobuf::Closure* done);
virtual void ServerStatus(::google::protobuf::RpcController* controller,
const ::trident::builtin::ServerStatusRequest* request,
::trident::builtin::ServerStatusResponse* response,
::google::protobuf::Closure* done);
virtual void ListService(::google::protobuf::RpcController* controller,
const ::trident::builtin::ListServiceRequest* request,
::trident::builtin::ListServiceResponse* response,
::google::protobuf::Closure* done);
virtual void Stat(::google::protobuf::RpcController* controller,
const ::trident::builtin::StatRequest* request,
::trident::builtin::StatResponse* response,
::google::protobuf::Closure* done);
private:
RpcServerImplWPtr _rpc_server;
ServicePoolWPtr _service_pool;
bool _disable_list_service;
MutexLock _list_service_lock;
ListServiceResponse _list_service_last_response;
int _list_service_last_count;
};
} // namespace builtin
} // namespace trident
#endif // _TRIDENT_BUILTIN_SERVICE_IMPL_H_
/* vim: set ts=4 sw=4 sts=4 tw=100 */