aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.h
diff options
context:
space:
mode:
authorGravatar Derek Murray <mrry@google.com>2016-03-07 15:18:19 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-03-08 17:15:22 -0800
commit848d554a78715391421737088c348c513e3e8c6d (patch)
treed145de31389b9fb75f60e3bb882785b700ad40a9 /tensorflow/core/distributed_runtime/rpc/grpc_server_lib.h
parent13024c58fa87a87db23f6869a0c33598bb5c027d (diff)
Prototype of an in-process gRPC server for TensorFlow/Python.
Adds support for binding a TensorFlow server to any port, to support single-process testing. This interface is a work in progress. In particular, it supports launching a server, but the support for clean shutdown is incomplete. Change: 116593644
Diffstat (limited to 'tensorflow/core/distributed_runtime/rpc/grpc_server_lib.h')
-rw-r--r--tensorflow/core/distributed_runtime/rpc/grpc_server_lib.h65
1 files changed, 0 insertions, 65 deletions
diff --git a/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.h b/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.h
deleted file mode 100644
index a06989d88c..0000000000
--- a/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Copyright 2016 Google Inc. All Rights Reserved.
-
-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
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-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.
-==============================================================================*/
-
-#ifndef THIRD_PARTY_TENSORFLOW_CORE_DISTRIBUTED_RUNTIME_RPC_GRPC_SERVER_LIB_H_
-#define THIRD_PARTY_TENSORFLOW_CORE_DISTRIBUTED_RUNTIME_RPC_GRPC_SERVER_LIB_H_
-
-#include <memory>
-
-#include "tensorflow/core/lib/core/status.h"
-#include "tensorflow/core/platform/macros.h"
-#include "tensorflow/core/platform/types.h"
-#include "tensorflow/core/protobuf/tensorflow_server.pb.h"
-
-namespace tensorflow {
-
-// Represents a single TensorFlow server, which exports Master and Worker
-// services.
-class ServerInterface {
- public:
- ServerInterface() {}
- virtual ~ServerInterface() {}
-
- // Starts the server running asynchronously. Returns OK on success, otherwise
- // returns an error.
- virtual Status Start() = 0;
-
- // Stops the server asynchronously. Returns OK on success, otherwise returns
- // an error.
- //
- // After calling `Stop()`, the caller may call `Join()` to block until the
- // server has stopped.
- virtual Status Stop() = 0;
-
- // Blocks until the server has stopped. Returns OK on success, otherwise
- // returns an error.
- virtual Status Join() = 0;
-
- // Returns a target string that can be used to connect to this server using
- // `tensorflow::NewSession()`.
- virtual const string& target() const = 0;
-
- private:
- TF_DISALLOW_COPY_AND_ASSIGN(ServerInterface);
-};
-
-// Creates a server based on the given `server_def`, and stores it in
-// *out_server. Returns OK on success, otherwise returns an error.
-Status NewServer(const ServerDef& server_def,
- std::unique_ptr<ServerInterface>* out_server);
-
-} // namespace tensorflow
-
-#endif // THIRD_PARTY_TENSORFLOW_CORE_DISTRIBUTED_RUNTIME_RPC_GRPC_SERVER_LIB_H_