http://git-wip-us.apache.org/repos/asf/mesos-site/blob/ebf6216f/content/api/latest/c++/grpc_8hpp.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/grpc_8hpp.html b/content/api/latest/c++/grpc_8hpp.html new file mode 100644 index 0000000..0b6280a --- /dev/null +++ b/content/api/latest/c++/grpc_8hpp.html @@ -0,0 +1,134 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.5"/> +<title>Apache Mesos: 3rdparty/libprocess/include/process/grpc.hpp File Reference</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">Apache Mesos + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.5 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="namespaces.html"><span>Namespaces</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li><a href="examples.html"><span>Examples</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_8cab8f464681f7cc51cee77e79a434cd.html">3rdparty</a></li><li class="navelem"><a class="el" href="dir_043a76de98701f9bddf61b5e98f305ff.html">libprocess</a></li><li class="navelem"><a class="el" href="dir_eac18f7a64f6f8afbd1493ef4e09abdb.html">include</a></li><li class="navelem"><a class="el" href="dir_1894286df79cf582d947dbc4268b06cf.html">process</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#nested-classes">Classes</a> | +<a href="#namespaces">Namespaces</a> | +<a href="#define-members">Macros</a> </div> + <div class="headertitle"> +<div class="title">grpc.hpp File Reference</div> </div> +</div><!--header--> +<div class="contents"> +<div class="textblock"><code>#include <atomic></code><br/> +<code>#include <chrono></code><br/> +<code>#include <memory></code><br/> +<code>#include <thread></code><br/> +<code>#include <type_traits></code><br/> +<code>#include <google/protobuf/message.h></code><br/> +<code>#include <grpc++/grpc++.h></code><br/> +<code>#include <<a class="el" href="future_8hpp_source.html">process/future.hpp</a>></code><br/> +<code>#include <<a class="el" href="owned_8hpp_source.html">process/owned.hpp</a>></code><br/> +<code>#include <<a class="el" href="libprocess_2include_2process_2process_8hpp_source.html">process/process.hpp</a>></code><br/> +<code>#include <<a class="el" href="duration_8hpp_source.html">stout/duration.hpp</a>></code><br/> +<code>#include <<a class="el" href="lambda_8hpp_source.html">stout/lambda.hpp</a>></code><br/> +<code>#include <<a class="el" href="synchronized_8hpp_source.html">stout/synchronized.hpp</a>></code><br/> +<code>#include <<a class="el" href="try_8hpp_source.html">stout/try.hpp</a>></code><br/> +</div> +<p><a href="grpc_8hpp_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> +Classes</h2></td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classprocess_1_1grpc_1_1Channel.html">process::grpc::Channel</a></td></tr> +<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">A copyable interface to manage a connection to a gRPC server. <a href="classprocess_1_1grpc_1_1Channel.html#details">More...</a><br/></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classprocess_1_1grpc_1_1client_1_1Runtime.html">process::grpc::client::Runtime</a></td></tr> +<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">A copyable interface to manage an internal gRPC runtime instance for asynchronous gRPC calls. <a href="classprocess_1_1grpc_1_1client_1_1Runtime.html#details">More...</a><br/></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a> +Namespaces</h2></td></tr> +<tr class="memitem:namespaceprocess"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess.html">process</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:namespaceprocess_1_1grpc"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1grpc.html">process::grpc</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:namespaceprocess_1_1grpc_1_1client"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceprocess_1_1grpc_1_1client.html">process::grpc::client</a></td></tr> +<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> +</table><table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> +Macros</h2></td></tr> +<tr class="memitem:af7c02a396d36035ea181b30f1d040f54"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="grpc_8hpp.html#af7c02a396d36035ea181b30f1d040f54">GRPC_RPC</a>(service, rpc)   (&service::Stub::Async##rpc)</td></tr> +<tr class="separator:af7c02a396d36035ea181b30f1d040f54"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Macro Definition Documentation</h2> +<a class="anchor" id="af7c02a396d36035ea181b30f1d040f54"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define GRPC_RPC</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">service, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">rpc </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td>   (&service::Stub::Async##rpc)</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.5 +</small></address> +</body> +</html>
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/ebf6216f/content/api/latest/c++/grpc_8hpp_source.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/grpc_8hpp_source.html b/content/api/latest/c++/grpc_8hpp_source.html new file mode 100644 index 0000000..c353cfd --- /dev/null +++ b/content/api/latest/c++/grpc_8hpp_source.html @@ -0,0 +1,252 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen 1.8.5"/> +<title>Apache Mesos: 3rdparty/libprocess/include/process/grpc.hpp Source File</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">Apache Mesos + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.5 --> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="pages.html"><span>Related Pages</span></a></li> + <li><a href="namespaces.html"><span>Namespaces</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li><a href="examples.html"><span>Examples</span></a></li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +<div id="nav-path" class="navpath"> + <ul> +<li class="navelem"><a class="el" href="dir_8cab8f464681f7cc51cee77e79a434cd.html">3rdparty</a></li><li class="navelem"><a class="el" href="dir_043a76de98701f9bddf61b5e98f305ff.html">libprocess</a></li><li class="navelem"><a class="el" href="dir_eac18f7a64f6f8afbd1493ef4e09abdb.html">include</a></li><li class="navelem"><a class="el" href="dir_1894286df79cf582d947dbc4268b06cf.html">process</a></li> </ul> +</div> +</div><!-- top --> +<div class="header"> + <div class="headertitle"> +<div class="title">grpc.hpp</div> </div> +</div><!--header--> +<div class="contents"> +<a href="grpc_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div> +<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// you may not use this file except in compliance with the License.</span></div> +<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// You may obtain a copy of the License at</span></div> +<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div> +<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></div> +<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">//</span></div> +<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">// Unless required by applicable law or agreed to in writing, software</span></div> +<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div> +<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div> +<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// See the License for the specific language governing permissions and</span></div> +<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// limitations under the License</span></div> +<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div> +<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#ifndef __PROCESS_GRPC_HPP__</span></div> +<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor"></span><span class="preprocessor">#define __PROCESS_GRPC_HPP__</span></div> +<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor"></span></div> +<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include <atomic></span></div> +<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include <chrono></span></div> +<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include <memory></span></div> +<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include <thread></span></div> +<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include <type_traits></span></div> +<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div> +<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include <google/protobuf/message.h></span></div> +<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div> +<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <grpc++/grpc++.h></span></div> +<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div> +<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <<a class="code" href="future_8hpp.html">process/future.hpp</a>></span></div> +<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <<a class="code" href="owned_8hpp.html">process/owned.hpp</a>></span></div> +<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <<a class="code" href="libprocess_2include_2process_2process_8hpp.html">process/process.hpp</a>></span></div> +<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div> +<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include <<a class="code" href="duration_8hpp.html">stout/duration.hpp</a>></span></div> +<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include <<a class="code" href="lambda_8hpp.html">stout/lambda.hpp</a>></span></div> +<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include <<a class="code" href="synchronized_8hpp.html">stout/synchronized.hpp</a>></span></div> +<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include <<a class="code" href="try_8hpp.html">stout/try.hpp</a>></span></div> +<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div> +<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div> +<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment">// This file provides libprocess "support" for using gRPC. In</span></div> +<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment">// particular, it defines two wrapper classes: `Channel` (representing a</span></div> +<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment">// connection to a gRPC server) and `client::Runtime`, which integrates</span></div> +<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment">// an event loop waiting for gRPC responses, and provides the `call`</span></div> +<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="comment">// interface to create an asynchrous gRPC call and return a `Future`.</span></div> +<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div> +<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div> +<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="grpc_8hpp.html#af7c02a396d36035ea181b30f1d040f54"> 43</a></span> <span class="preprocessor">#define GRPC_RPC(service, rpc) \</span></div> +<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="preprocessor"> (&service::Stub::Async##rpc)</span></div> +<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="preprocessor"></span></div> +<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">namespace </span><a class="code" href="namespaceos.html#ae19e4161a51b86a1f330f3bf1dc75389">process</a> {</div> +<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="namespaceprocess_1_1grpc.html"> 47</a></span> <span class="keyword">namespace </span>grpc {</div> +<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div> +<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="comment">// Forward declarations.</span></div> +<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="namespaceprocess_1_1grpc_1_1client.html"> 50</a></span> <span class="keyword">namespace </span>client { <span class="keyword">class </span><a class="code" href="classprocess_1_1grpc_1_1client_1_1Runtime.html">Runtime</a>; }</div> +<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div> +<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div> +<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classprocess_1_1grpc_1_1Channel.html"> 59</a></span> <span class="keyword">class </span><a class="code" href="classprocess_1_1grpc_1_1Channel.html">Channel</a></div> +<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> {</div> +<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="keyword">public</span>:</div> +<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classprocess_1_1grpc_1_1Channel.html#abad4dfab64222145737de18007454c9e"> 62</a></span>  <a class="code" href="classprocess_1_1grpc_1_1Channel.html#abad4dfab64222145737de18007454c9e">Channel</a>(<span class="keyword">const</span> std::string& uri,</div> +<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keyword">const</span> std::shared_ptr<::grpc::ChannelCredentials>& credentials =</div> +<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  ::grpc::InsecureChannelCredentials())</div> +<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  : channel(::grpc::CreateChannel(uri, credentials)) {}</div> +<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div> +<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">private</span>:</div> +<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  std::shared_ptr<::grpc::Channel> channel;</div> +<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> </div> +<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="classprocess_1_1grpc_1_1Channel.html#a466292b9d4cf95a19d3f9161266456d4"> 70</a></span>  <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classprocess_1_1grpc_1_1client_1_1Runtime.html">client::Runtime</a>;</div> +<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> };</div> +<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> </div> +<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> </div> +<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="keyword">namespace </span>client {</div> +<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div> +<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classprocess_1_1grpc_1_1client_1_1Runtime.html"> 89</a></span> <span class="keyword">class </span><a class="code" href="classprocess_1_1grpc_1_1client_1_1Runtime.html">Runtime</a></div> +<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> {</div> +<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="keyword">public</span>:</div> +<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="classprocess_1_1grpc_1_1client_1_1Runtime.html#a5f7e56d9ebb540a9dbc52c5fb816a024"> 92</a></span>  <a class="code" href="classprocess_1_1grpc_1_1client_1_1Runtime.html#a5f7e56d9ebb540a9dbc52c5fb816a024">Runtime</a>() : data(new Data()) {}</div> +<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> </div> +<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> Stub, <span class="keyword">typename</span> Request, <span class="keyword">typename</span> Response></div> +<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="classprocess_1_1grpc_1_1client_1_1Runtime.html#a81a2394e5f2cff4007b93c6ed729bf5f"> 104</a></span>  <a class="code" href="classprocess_1_1Future.html">Future<Response></a> <a class="code" href="classprocess_1_1grpc_1_1client_1_1Runtime.html#a81a2394e5f2cff4007b93c6ed729bf5f">call</a>(</div> +<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="keyword">const</span> <a class="code" href="classprocess_1_1grpc_1_1Channel.html">Channel</a>& channel,</div> +<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  std::unique_ptr<::grpc::ClientAsyncResponseReader<Response>>(Stub::*rpc)(</div> +<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  ::grpc::ClientContext*,</div> +<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="keyword">const</span> Request&,</div> +<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  ::grpc::CompletionQueue*),</div> +<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keyword">const</span> Request& <a class="code" href="namespaceprocess_1_1http.html#ad8f400b5e54038df7e5662ec35da05fa">request</a>)</div> +<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  {</div> +<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  static_assert(</div> +<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  std::is_convertible<Request*, google::protobuf::Message*>::value,</div> +<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="stringliteral">"Request must be a protobuf message"</span>);</div> +<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> </div> +<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keyword">synchronized</span> (data->lock) {</div> +<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordflow">if</span> (data->terminating) {</div> +<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordflow">return</span> <a class="code" href="structprocess_1_1Failure.html">Failure</a>(<span class="stringliteral">"Runtime has been terminated."</span>);</div> +<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  }</div> +<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> </div> +<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  std::shared_ptr<::grpc::ClientContext> <a class="code" href="namespaceprocess_1_1network_1_1openssl.html#a9ea7f1e144d9731d6fb4e4a0d80a7c56">context</a>(</div> +<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  new ::grpc::ClientContext());</div> +<div class="line"><a name="l00123"></a><span class="lineno"> 123</span> </div> +<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="comment">// TODO(chhsiao): Allow the caller to specify a timeout.</span></div> +<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  context->set_deadline(</div> +<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  std::chrono::system_clock::now() + std::chrono::seconds(5));</div> +<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> </div> +<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="comment">// Create a `Promise` and a callback lambda as a tag and invokes</span></div> +<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="comment">// an asynchronous gRPC call through the `CompletionQueue`</span></div> +<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="comment">// managed by `data`. The `Promise` will be set by the callback</span></div> +<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="comment">// upon server response.</span></div> +<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  std::shared_ptr<Promise<Response>> <a class="code" href="namespacemesos_1_1internal_1_1log_1_1protocol.html#a3b1f8bd7b18c51af9d1f58842950b545">promise</a>(<span class="keyword">new</span> <a class="code" href="classprocess_1_1Promise.html">Promise<Response></a>);</div> +<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  promise->future().onDiscard([=] { context->TryCancel(); });</div> +<div class="line"><a name="l00134"></a><span class="lineno"> 134</span> </div> +<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  std::shared_ptr<Response> response(<span class="keyword">new</span> Response());</div> +<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  std::shared_ptr<::grpc::Status> <a class="code" href="namespaceproc.html#a34396c6140a28f583dc13fee3c3c35d4">status</a>(new ::grpc::Status());</div> +<div class="line"><a name="l00137"></a><span class="lineno"> 137</span> </div> +<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  std::shared_ptr<::grpc::ClientAsyncResponseReader<Response>> reader(</div> +<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  (Stub(channel.channel).*rpc)(context.get(), <a class="code" href="namespaceprocess_1_1http.html#ad8f400b5e54038df7e5662ec35da05fa">request</a>, &data->queue));</div> +<div class="line"><a name="l00140"></a><span class="lineno"> 140</span> </div> +<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  reader->Finish(</div> +<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  response.get(),</div> +<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  status.get(),</div> +<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keyword">new</span> lambda::function<void()>(</div> +<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="comment">// NOTE: `context` and `reader` need to be held on in</span></div> +<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="comment">// order to get updates for the ongoing RPC, and thus</span></div> +<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="comment">// are captured here. The lambda itself will later be</span></div> +<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="comment">// retrieved and managed in `Data::loop()`.</span></div> +<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  [<a class="code" href="namespaceprocess_1_1network_1_1openssl.html#a9ea7f1e144d9731d6fb4e4a0d80a7c56">context</a>, reader, response, <a class="code" href="namespaceproc.html#a34396c6140a28f583dc13fee3c3c35d4">status</a>, <a class="code" href="namespacemesos_1_1internal_1_1log_1_1protocol.html#a3b1f8bd7b18c51af9d1f58842950b545">promise</a>]() {</div> +<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  CHECK(promise->future().isPending());</div> +<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="keywordflow">if</span> (promise->future().hasDiscard()) {</div> +<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  promise->discard();</div> +<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (status->ok()) {</div> +<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  promise->set(*response);</div> +<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  } <span class="keywordflow">else</span> {</div> +<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  promise->fail(status->error_message());</div> +<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  }</div> +<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  }));</div> +<div class="line"><a name="l00159"></a><span class="lineno"> 159</span> </div> +<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keywordflow">return</span> promise->future();</div> +<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  }</div> +<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  }</div> +<div class="line"><a name="l00163"></a><span class="lineno"> 163</span> </div> +<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="keywordtype">void</span> <a class="code" href="classprocess_1_1grpc_1_1client_1_1Runtime.html#ae9cb9b61f055d4ecec094aeef206e7d4">terminate</a>();</div> +<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> </div> +<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <a class="code" href="classprocess_1_1Future.html">Future<Nothing></a> <a class="code" href="classprocess_1_1grpc_1_1client_1_1Runtime.html#a96c1724b37429b930c2214f3acc90393">wait</a>();</div> +<div class="line"><a name="l00178"></a><span class="lineno"> 178</span> </div> +<div class="line"><a name="l00179"></a><span class="lineno"> 179</span> <span class="keyword">private</span>:</div> +<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="keyword">struct </span>Data</div> +<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  {</div> +<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  Data();</div> +<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  ~Data();</div> +<div class="line"><a name="l00184"></a><span class="lineno"> 184</span> </div> +<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordtype">void</span> <a class="code" href="namespaceprocess.html#a59c192ee8ea5abbbee1642957f47c92a">loop</a>();</div> +<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <span class="keywordtype">void</span> <a class="code" href="classprocess_1_1grpc_1_1client_1_1Runtime.html#ae9cb9b61f055d4ecec094aeef206e7d4">terminate</a>();</div> +<div class="line"><a name="l00187"></a><span class="lineno"> 187</span> </div> +<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  std::unique_ptr<std::thread> looper;</div> +<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  ::grpc::CompletionQueue queue;</div> +<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <a class="code" href="classprocess_1_1ProcessBase.html">ProcessBase</a> <a class="code" href="namespaceos.html#ae19e4161a51b86a1f330f3bf1dc75389">process</a>;</div> +<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  std::atomic_flag lock;</div> +<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keywordtype">bool</span> terminating;</div> +<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <a class="code" href="classprocess_1_1Promise.html">Promise<Nothing></a> terminated;</div> +<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  };</div> +<div class="line"><a name="l00195"></a><span class="lineno"> 195</span> </div> +<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  std::shared_ptr<Data> data;</div> +<div class="line"><a name="l00197"></a><span class="lineno"> 197</span> };</div> +<div class="line"><a name="l00198"></a><span class="lineno"> 198</span> </div> +<div class="line"><a name="l00199"></a><span class="lineno"> 199</span> } <span class="comment">// namespace client {</span></div> +<div class="line"><a name="l00200"></a><span class="lineno"> 200</span> </div> +<div class="line"><a name="l00201"></a><span class="lineno"> 201</span> } <span class="comment">// namespace grpc {</span></div> +<div class="line"><a name="l00202"></a><span class="lineno"> 202</span> } <span class="comment">// namespace process {</span></div> +<div class="line"><a name="l00203"></a><span class="lineno"> 203</span> </div> +<div class="line"><a name="l00204"></a><span class="lineno"> 204</span> <span class="preprocessor">#endif // __PROCESS_GRPC_HPP__</span></div> +<div class="ttc" id="classprocess_1_1grpc_1_1client_1_1Runtime_html_a81a2394e5f2cff4007b93c6ed729bf5f"><div class="ttname"><a href="classprocess_1_1grpc_1_1client_1_1Runtime.html#a81a2394e5f2cff4007b93c6ed729bf5f">process::grpc::client::Runtime::call</a></div><div class="ttdeci">Future< Response > call(const Channel &channel, std::unique_ptr<::grpc::ClientAsyncResponseReader< Response >>(Stub::*rpc)(::grpc::ClientContext *, const Request &,::grpc::CompletionQueue *), const Request &request)</div><div class="ttdoc">Sends an asynchronous gRPC call. </div><div class="ttdef"><b>Definition:</b> grpc.hpp:104</div></div> +<div class="ttc" id="synchronized_8hpp_html"><div class="ttname"><a href="synchronized_8hpp.html">synchronized.hpp</a></div></div> +<div class="ttc" id="namespaceprocess_1_1http_html_ad8f400b5e54038df7e5662ec35da05fa"><div class="ttname"><a href="namespaceprocess_1_1http.html#ad8f400b5e54038df7e5662ec35da05fa">process::http::request</a></div><div class="ttdeci">Future< Response > request(const Request &request, bool streamedResponse=false)</div><div class="ttdoc">Asynchronously sends an HTTP request to the process and returns the HTTP response once the entire res...</div></div> +<div class="ttc" id="structprocess_1_1Failure_html"><div class="ttname"><a href="structprocess_1_1Failure.html">process::Failure</a></div><div class="ttdef"><b>Definition:</b> future.hpp:549</div></div> +<div class="ttc" id="namespaceproc_html_a34396c6140a28f583dc13fee3c3c35d4"><div class="ttname"><a href="namespaceproc.html#a34396c6140a28f583dc13fee3c3c35d4">proc::status</a></div><div class="ttdeci">Result< ProcessStatus > status(pid_t pid)</div><div class="ttdef"><b>Definition:</b> proc.hpp:166</div></div> +<div class="ttc" id="classprocess_1_1ProcessBase_html"><div class="ttname"><a href="classprocess_1_1ProcessBase.html">process::ProcessBase</a></div><div class="ttdef"><b>Definition:</b> process.hpp:72</div></div> +<div class="ttc" id="lambda_8hpp_html"><div class="ttname"><a href="lambda_8hpp.html">lambda.hpp</a></div></div> +<div class="ttc" id="namespaceprocess_1_1network_1_1openssl_html_a9ea7f1e144d9731d6fb4e4a0d80a7c56"><div class="ttname"><a href="namespaceprocess_1_1network_1_1openssl.html#a9ea7f1e144d9731d6fb4e4a0d80a7c56">process::network::openssl::context</a></div><div class="ttdeci">SSL_CTX * context()</div></div> +<div class="ttc" id="duration_8hpp_html"><div class="ttname"><a href="duration_8hpp.html">duration.hpp</a></div></div> +<div class="ttc" id="classprocess_1_1grpc_1_1client_1_1Runtime_html"><div class="ttname"><a href="classprocess_1_1grpc_1_1client_1_1Runtime.html">process::grpc::client::Runtime</a></div><div class="ttdoc">A copyable interface to manage an internal gRPC runtime instance for asynchronous gRPC calls...</div><div class="ttdef"><b>Definition:</b> grpc.hpp:89</div></div> +<div class="ttc" id="classprocess_1_1Promise_html"><div class="ttname"><a href="classprocess_1_1Promise.html">process::Promise</a></div><div class="ttdef"><b>Definition:</b> future.hpp:72</div></div> +<div class="ttc" id="namespaceprocess_html_a59c192ee8ea5abbbee1642957f47c92a"><div class="ttname"><a href="namespaceprocess.html#a59c192ee8ea5abbbee1642957f47c92a">process::loop</a></div><div class="ttdeci">struct ev_loop * loop</div><div class="ttdef"><b>Definition:</b> loop.hpp:452</div></div> +<div class="ttc" id="classprocess_1_1grpc_1_1Channel_html_abad4dfab64222145737de18007454c9e"><div class="ttname"><a href="classprocess_1_1grpc_1_1Channel.html#abad4dfab64222145737de18007454c9e">process::grpc::Channel::Channel</a></div><div class="ttdeci">Channel(const std::string &uri, const std::shared_ptr<::grpc::ChannelCredentials > &credentials=::grpc::InsecureChannelCredentials())</div><div class="ttdef"><b>Definition:</b> grpc.hpp:62</div></div> +<div class="ttc" id="namespacemesos_1_1internal_1_1log_1_1protocol_html_a3b1f8bd7b18c51af9d1f58842950b545"><div class="ttname"><a href="namespacemesos_1_1internal_1_1log_1_1protocol.html#a3b1f8bd7b18c51af9d1f58842950b545">mesos::internal::log::protocol::promise</a></div><div class="ttdeci">Protocol< PromiseRequest, PromiseResponse > promise</div></div> +<div class="ttc" id="classprocess_1_1grpc_1_1client_1_1Runtime_html_a5f7e56d9ebb540a9dbc52c5fb816a024"><div class="ttname"><a href="classprocess_1_1grpc_1_1client_1_1Runtime.html#a5f7e56d9ebb540a9dbc52c5fb816a024">process::grpc::client::Runtime::Runtime</a></div><div class="ttdeci">Runtime()</div><div class="ttdef"><b>Definition:</b> grpc.hpp:92</div></div> +<div class="ttc" id="future_8hpp_html"><div class="ttname"><a href="future_8hpp.html">future.hpp</a></div></div> +<div class="ttc" id="namespaceos_html_ae19e4161a51b86a1f330f3bf1dc75389"><div class="ttname"><a href="namespaceos.html#ae19e4161a51b86a1f330f3bf1dc75389">os::process</a></div><div class="ttdeci">Result< Process > process(pid_t pid)</div><div class="ttdef"><b>Definition:</b> freebsd.hpp:30</div></div> +<div class="ttc" id="classprocess_1_1grpc_1_1Channel_html"><div class="ttname"><a href="classprocess_1_1grpc_1_1Channel.html">process::grpc::Channel</a></div><div class="ttdoc">A copyable interface to manage a connection to a gRPC server. </div><div class="ttdef"><b>Definition:</b> grpc.hpp:59</div></div> +<div class="ttc" id="try_8hpp_html"><div class="ttname"><a href="try_8hpp.html">try.hpp</a></div></div> +<div class="ttc" id="classprocess_1_1grpc_1_1client_1_1Runtime_html_ae9cb9b61f055d4ecec094aeef206e7d4"><div class="ttname"><a href="classprocess_1_1grpc_1_1client_1_1Runtime.html#ae9cb9b61f055d4ecec094aeef206e7d4">process::grpc::client::Runtime::terminate</a></div><div class="ttdeci">void terminate()</div><div class="ttdoc">Asks the internal gRPC runtime instance to shut down the CompletionQueue, which would stop its looper...</div></div> +<div class="ttc" id="owned_8hpp_html"><div class="ttname"><a href="owned_8hpp.html">owned.hpp</a></div></div> +<div class="ttc" id="libprocess_2include_2process_2process_8hpp_html"><div class="ttname"><a href="libprocess_2include_2process_2process_8hpp.html">process.hpp</a></div></div> +<div class="ttc" id="classprocess_1_1grpc_1_1client_1_1Runtime_html_a96c1724b37429b930c2214f3acc90393"><div class="ttname"><a href="classprocess_1_1grpc_1_1client_1_1Runtime.html#a96c1724b37429b930c2214f3acc90393">process::grpc::client::Runtime::wait</a></div><div class="ttdeci">Future< Nothing > wait()</div></div> +<div class="ttc" id="classprocess_1_1Future_html"><div class="ttname"><a href="classprocess_1_1Future.html">process::Future</a></div><div class="ttdef"><b>Definition:</b> future.hpp:56</div></div> +</div><!-- fragment --></div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.5 +</small></address> +</body> +</html>