TensorFlow Serving C++ API Documentation
tensorflow_serving
core
test_util
mock_server_request_logger.h
1
/* Copyright 2017 Google Inc. All Rights Reserved.
2
3
Licensed under the Apache License, Version 2.0 (the "License");
4
you may not use this file except in compliance with the License.
5
You may obtain a copy of the License at
6
7
http://www.apache.org/licenses/LICENSE-2.0
8
9
Unless required by applicable law or agreed to in writing, software
10
distributed under the License is distributed on an "AS IS" BASIS,
11
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
See the License for the specific language governing permissions and
13
limitations under the License.
14
==============================================================================*/
15
16
#ifndef TENSORFLOW_SERVING_CORE_TEST_UTIL_MOCK_SERVER_REQUEST_LOGGER_H_
17
#define TENSORFLOW_SERVING_CORE_TEST_UTIL_MOCK_SERVER_REQUEST_LOGGER_H_
18
19
#include <string>
20
#include <vector>
21
22
#include <gmock/gmock.h>
23
#include "tensorflow_serving/core/server_request_logger.h"
24
25
namespace
tensorflow {
26
namespace
serving {
27
namespace
test_util {
28
29
class
MockServerRequestLogger
:
public
ServerRequestLogger
{
30
public
:
31
MockServerRequestLogger
() :
ServerRequestLogger
({}) {}
32
33
MOCK_METHOD(Status, Update,
34
((
const
std::map<
string
, std::vector<LoggingConfig>>&
35
logging_config_map)),
36
(
override
));
37
38
MOCK_METHOD(Status, Log,
39
(
const
google::protobuf::Message& request,
const
google::protobuf::Message& response,
40
const
LogMetadata& log_metadata),
41
(
override
));
42
};
43
44
}
// namespace test_util
45
}
// namespace serving
46
}
// namespace tensorflow
47
48
#endif
// TENSORFLOW_SERVING_CORE_TEST_UTIL_MOCK_SERVER_REQUEST_LOGGER_H_
tensorflow::serving::ServerRequestLogger
Definition:
server_request_logger.h:40
tensorflow::serving::test_util::MockServerRequestLogger
Definition:
mock_server_request_logger.h:29
Generated by
1.9.1