-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Client (pbrt_services.Pbrt_services.Client)</title><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.3.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">pbrt_services</a> » <a href="../index.html">Pbrt_services</a> » Client</nav><header class="odoc-preamble"><h1>Module <code><span>Pbrt_services.Client</span></code></h1><p>Service stubs, client side</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-mode"><a href="#type-mode" class="anchor"></a><code><span><span class="keyword">type</span> <span>_ mode</span></span><span> = </span></code><ol><li id="type-mode.Unary" class="def variant constructor anchored"><a href="#type-mode.Unary" class="anchor"></a><code><span>| </span><span><span class="constructor">Unary</span> : <span><a href="../Value_mode/index.html#type-unary">Value_mode.unary</a> <a href="#type-mode">mode</a></span></span></code></li><li id="type-mode.Stream" class="def variant constructor anchored"><a href="#type-mode.Stream" class="anchor"></a><code><span>| </span><span><span class="constructor">Stream</span> : <span><a href="../Value_mode/index.html#type-stream">Value_mode.stream</a> <a href="#type-mode">mode</a></span></span></code></li></ol></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-rpc"><a href="#type-rpc" class="anchor"></a><code><span><span class="keyword">type</span> <span>('req, 'req_mode, 'res, 'res_mode) rpc</span></span><span> = </span><span>{</span></code><ol><li id="type-rpc.service_name" class="def record field anchored"><a href="#type-rpc.service_name" class="anchor"></a><code><span>service_name : string;</span></code></li><li id="type-rpc.package" class="def record field anchored"><a href="#type-rpc.package" class="anchor"></a><code><span>package : <span>string list</span>;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Package for the service</p><span class="comment-delim">*)</span></div></li><li id="type-rpc.rpc_name" class="def record field anchored"><a href="#type-rpc.rpc_name" class="anchor"></a><code><span>rpc_name : string;</span></code></li><li id="type-rpc.req_mode" class="def record field anchored"><a href="#type-rpc.req_mode" class="anchor"></a><code><span>req_mode : <span><span class="type-var">'req_mode</span> <a href="#type-mode">mode</a></span>;</span></code></li><li id="type-rpc.res_mode" class="def record field anchored"><a href="#type-rpc.res_mode" class="anchor"></a><code><span>res_mode : <span><span class="type-var">'res_mode</span> <a href="#type-mode">mode</a></span>;</span></code></li><li id="type-rpc.encode_json_req" class="def record field anchored"><a href="#type-rpc.encode_json_req" class="anchor"></a><code><span>encode_json_req : <span><span class="type-var">'req</span> <span class="arrow">-></span></span> <span class="xref-unresolved">Yojson</span>.Basic.t;</span></code></li><li id="type-rpc.encode_pb_req" class="def record field anchored"><a href="#type-rpc.encode_pb_req" class="anchor"></a><code><span>encode_pb_req : <span><span class="type-var">'req</span> <span class="arrow">-></span></span> <span><a href="../../../pbrt/Pbrt/Encoder/index.html#type-t">Pbrt.Encoder.t</a> <span class="arrow">-></span></span> unit;</span></code></li><li id="type-rpc.decode_json_res" class="def record field anchored"><a href="#type-rpc.decode_json_res" class="anchor"></a><code><span>decode_json_res : <span><span class="xref-unresolved">Yojson</span>.Basic.t <span class="arrow">-></span></span> <span class="type-var">'res</span>;</span></code></li><li id="type-rpc.decode_pb_res" class="def record field anchored"><a href="#type-rpc.decode_pb_res" class="anchor"></a><code><span>decode_pb_res : <span><a href="../../../pbrt/Pbrt/Decoder/index.html#type-t">Pbrt.Decoder.t</a> <span class="arrow">-></span></span> <span class="type-var">'res</span>;</span></code></li></ol><code><span>}</span></code></div><div class="spec-doc"><p>A RPC description. You need a transport library that knows where to send the bytes to actually use it.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-mk_rpc"><a href="#val-mk_rpc" class="anchor"></a><code><span><span class="keyword">val</span> mk_rpc : | ||
<span><span class="optlabel">?package</span>:<span>string list</span> <span class="arrow">-></span></span> | ||
<span><span class="label">service_name</span>:string <span class="arrow">-></span></span> | ||
<span><span class="label">rpc_name</span>:string <span class="arrow">-></span></span> | ||
<span><span class="label">req_mode</span>:<span><span class="type-var">'req_mode</span> <a href="#type-mode">mode</a></span> <span class="arrow">-></span></span> | ||
<span><span class="label">res_mode</span>:<span><span class="type-var">'res_mode</span> <a href="#type-mode">mode</a></span> <span class="arrow">-></span></span> | ||
<span><span class="label">encode_json_req</span>:<span>(<span><span class="type-var">'req</span> <span class="arrow">-></span></span> <span class="xref-unresolved">Yojson</span>.Basic.t)</span> <span class="arrow">-></span></span> | ||
<span><span class="label">encode_pb_req</span>:<span>(<span><span class="type-var">'req</span> <span class="arrow">-></span></span> <span><a href="../../../pbrt/Pbrt/Encoder/index.html#type-t">Pbrt.Encoder.t</a> <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span> | ||
<span><span class="label">decode_json_res</span>:<span>(<span><span class="xref-unresolved">Yojson</span>.Basic.t <span class="arrow">-></span></span> <span class="type-var">'res</span>)</span> <span class="arrow">-></span></span> | ||
<span><span class="label">decode_pb_res</span>:<span>(<span><a href="../../../pbrt/Pbrt/Decoder/index.html#type-t">Pbrt.Decoder.t</a> <span class="arrow">-></span></span> <span class="type-var">'res</span>)</span> <span class="arrow">-></span></span> | ||
<span>unit <span class="arrow">-></span></span> | ||
<span><span>(<span class="type-var">'req</span>, <span class="type-var">'req_mode</span>, <span class="type-var">'res</span>, <span class="type-var">'res_mode</span>)</span> <a href="#type-rpc">rpc</a></span></span></code></div></div></div></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Server (pbrt_services.Pbrt_services.Server)</title><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.3.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">pbrt_services</a> » <a href="../index.html">Pbrt_services</a> » Server</nav><header class="odoc-preamble"><h1>Module <code><span>Pbrt_services.Server</span></code></h1><p>Service stubs, server side</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-mode"><a href="#type-mode" class="anchor"></a><code><span><span class="keyword">type</span> <span>'m mode</span></span><span> = <span><span class="type-var">'m</span> <a href="../Client/index.html#type-mode">Client.mode</a></span></span><span> = </span></code><ol><li id="type-mode.Unary" class="def variant constructor anchored"><a href="#type-mode.Unary" class="anchor"></a><code><span>| </span><span><span class="constructor">Unary</span> : <span><a href="../Value_mode/index.html#type-unary">Value_mode.unary</a> <a href="#type-mode">mode</a></span></span></code></li><li id="type-mode.Stream" class="def variant constructor anchored"><a href="#type-mode.Stream" class="anchor"></a><code><span>| </span><span><span class="constructor">Stream</span> : <span><a href="../Value_mode/index.html#type-stream">Value_mode.stream</a> <a href="#type-mode">mode</a></span></span></code></li></ol></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-rpc"><a href="#type-rpc" class="anchor"></a><code><span><span class="keyword">type</span> <span>('req, 'req_mode, 'res, 'res_mode) rpc</span></span><span> = </span><span>{</span></code><ol><li id="type-rpc.name" class="def record field anchored"><a href="#type-rpc.name" class="anchor"></a><code><span>name : string;</span></code></li><li id="type-rpc.req_mode" class="def record field anchored"><a href="#type-rpc.req_mode" class="anchor"></a><code><span>req_mode : <span><span class="type-var">'req_mode</span> <a href="#type-mode">mode</a></span>;</span></code></li><li id="type-rpc.res_mode" class="def record field anchored"><a href="#type-rpc.res_mode" class="anchor"></a><code><span>res_mode : <span><span class="type-var">'res_mode</span> <a href="#type-mode">mode</a></span>;</span></code></li><li id="type-rpc.encode_json_res" class="def record field anchored"><a href="#type-rpc.encode_json_res" class="anchor"></a><code><span>encode_json_res : <span><span class="type-var">'res</span> <span class="arrow">-></span></span> <span class="xref-unresolved">Yojson</span>.Basic.t;</span></code></li><li id="type-rpc.encode_pb_res" class="def record field anchored"><a href="#type-rpc.encode_pb_res" class="anchor"></a><code><span>encode_pb_res : <span><span class="type-var">'res</span> <span class="arrow">-></span></span> <span><a href="../../../pbrt/Pbrt/Encoder/index.html#type-t">Pbrt.Encoder.t</a> <span class="arrow">-></span></span> unit;</span></code></li><li id="type-rpc.decode_json_req" class="def record field anchored"><a href="#type-rpc.decode_json_req" class="anchor"></a><code><span>decode_json_req : <span><span class="xref-unresolved">Yojson</span>.Basic.t <span class="arrow">-></span></span> <span class="type-var">'req</span>;</span></code></li><li id="type-rpc.decode_pb_req" class="def record field anchored"><a href="#type-rpc.decode_pb_req" class="anchor"></a><code><span>decode_pb_req : <span><a href="../../../pbrt/Pbrt/Decoder/index.html#type-t">Pbrt.Decoder.t</a> <span class="arrow">-></span></span> <span class="type-var">'req</span>;</span></code></li></ol><code><span>}</span></code></div><div class="spec-doc"><p>A single RPC method, alongside encoders and decoders for input and output types. .</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-any_rpc"><a href="#type-any_rpc" class="anchor"></a><code><span><span class="keyword">type</span> any_rpc</span><span> = </span></code><ol><li id="type-any_rpc.RPC" class="def variant constructor anchored"><a href="#type-any_rpc.RPC" class="anchor"></a><code><span>| </span><span><span class="constructor">RPC</span> : <span><span>(<span class="type-var">'req</span>, <span class="type-var">'req_mode</span>, <span class="type-var">'res</span>, <span class="type-var">'res_mode</span>)</span> <a href="#type-rpc">rpc</a></span> <span class="arrow">-></span> <a href="#type-any_rpc">any_rpc</a></span></code></li></ol></div><div class="spec-doc"><p>A RPC endpoint.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-mk_rpc"><a href="#val-mk_rpc" class="anchor"></a><code><span><span class="keyword">val</span> mk_rpc : | ||
<span><span class="label">name</span>:string <span class="arrow">-></span></span> | ||
<span><span class="label">req_mode</span>:<span><span class="type-var">'req_mode</span> <a href="#type-mode">mode</a></span> <span class="arrow">-></span></span> | ||
<span><span class="label">res_mode</span>:<span><span class="type-var">'res_mode</span> <a href="#type-mode">mode</a></span> <span class="arrow">-></span></span> | ||
<span><span class="label">encode_json_res</span>:<span>(<span><span class="type-var">'res</span> <span class="arrow">-></span></span> <span class="xref-unresolved">Yojson</span>.Basic.t)</span> <span class="arrow">-></span></span> | ||
<span><span class="label">encode_pb_res</span>:<span>(<span><span class="type-var">'res</span> <span class="arrow">-></span></span> <span><a href="../../../pbrt/Pbrt/Encoder/index.html#type-t">Pbrt.Encoder.t</a> <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span> | ||
<span><span class="label">decode_json_req</span>:<span>(<span><span class="xref-unresolved">Yojson</span>.Basic.t <span class="arrow">-></span></span> <span class="type-var">'req</span>)</span> <span class="arrow">-></span></span> | ||
<span><span class="label">decode_pb_req</span>:<span>(<span><a href="../../../pbrt/Pbrt/Decoder/index.html#type-t">Pbrt.Decoder.t</a> <span class="arrow">-></span></span> <span class="type-var">'req</span>)</span> <span class="arrow">-></span></span> | ||
<span>unit <span class="arrow">-></span></span> | ||
<span><span>(<span class="type-var">'req</span>, <span class="type-var">'req_mode</span>, <span class="type-var">'res</span>, <span class="type-var">'res_mode</span>)</span> <a href="#type-rpc">rpc</a></span></span></code></div><div class="spec-doc"><p>Helper to build a RPC</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> <span>'h t</span></span><span> = </span><span>{</span></code><ol><li id="type-t.service_name" class="def record field anchored"><a href="#type-t.service_name" class="anchor"></a><code><span>service_name : string;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Name of the service</p><span class="comment-delim">*)</span></div></li><li id="type-t.package" class="def record field anchored"><a href="#type-t.package" class="anchor"></a><code><span>package : <span>string list</span>;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>The package this belongs in (e.g. "bigco.auth.secretpasswordstash"), split along "."</p><span class="comment-delim">*)</span></div></li><li id="type-t.handlers" class="def record field anchored"><a href="#type-t.handlers" class="anchor"></a><code><span>handlers : <span><span class="type-var">'h</span> list</span>;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>A list of handlers</p><span class="comment-delim">*)</span></div></li></ol><code><span>}</span></code></div><div class="spec-doc"><p>A service with fixed set of methods, which depends on the concrete RPC implementation. Each method is a handler of some type <code>'h</code>.</p></div></div></div></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Value_mode (pbrt_services.Pbrt_services.Value_mode)</title><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.3.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">pbrt_services</a> » <a href="../index.html">Pbrt_services</a> » Value_mode</nav><header class="odoc-preamble"><h1>Module <code><span>Pbrt_services.Value_mode</span></code></h1><p>Whether there's a single value or a stream of them</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-unary"><a href="#type-unary" class="anchor"></a><code><span><span class="keyword">type</span> unary</span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-stream"><a href="#type-stream" class="anchor"></a><code><span><span class="keyword">type</span> stream</span></code></div></div></div></body></html> |
Oops, something went wrong.