-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from dialohq/report-http2-error-status
Report HTTP2 error status when it's not OK
- Loading branch information
Showing
102 changed files
with
803 additions
and
107 deletions.
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 |
---|---|---|
@@ -1,18 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Rpc (grpc-async.Grpc_async.Client.Rpc)</title><link rel="stylesheet" href="../../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.1.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../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">grpc-async</a> » <a href="../../index.html">Grpc_async</a> » <a href="../index.html">Client</a> » Rpc</nav><header class="odoc-preamble"><h1>Module <code><span>Client.Rpc</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type" id="type-handler" class="anchored"><a href="#type-handler" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a handler</span></span><span> = | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Rpc (grpc-async.Grpc_async.Client.Rpc)</title><link rel="stylesheet" href="../../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.0"/><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">grpc-async</a> » <a href="../../index.html">Grpc_async</a> » <a href="../index.html">Client</a> » Rpc</nav><header class="odoc-preamble"><h1>Module <code><span>Client.Rpc</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-handler"><a href="#type-handler" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a handler</span></span><span> = | ||
<span><span class="xref-unresolved">H2</span>.Body.Writer.t <span class="arrow">-></span></span> | ||
<span><span><span class="xref-unresolved">H2</span>.Body.Reader.t <span class="xref-unresolved">Async</span>.Deferred.t</span> <span class="arrow">-></span></span> | ||
<span><span class="type-var">'a</span> <span class="xref-unresolved">Async</span>.Deferred.t</span></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-bidirectional_streaming" class="anchored"><a href="#val-bidirectional_streaming" class="anchor"></a><code><span><span class="keyword">val</span> bidirectional_streaming : | ||
<span><span class="type-var">'a</span> <span class="xref-unresolved">Async</span>.Deferred.t</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-bidirectional_streaming"><a href="#val-bidirectional_streaming" class="anchor"></a><code><span><span class="keyword">val</span> bidirectional_streaming : | ||
<span>handler: | ||
<span>( <span><span>string <span class="xref-unresolved">Async</span>.Pipe.Writer.t</span> <span class="arrow">-></span></span> | ||
<span>(<span><span>string <span class="xref-unresolved">Async</span>.Pipe.Writer.t</span> <span class="arrow">-></span></span> | ||
<span><span>string <span class="xref-unresolved">Async</span>.Pipe.Reader.t</span> <span class="arrow">-></span></span> | ||
<span><span class="type-var">'a</span> <span class="xref-unresolved">Async</span>.Deferred.t</span> )</span> <span class="arrow">-></span></span> | ||
<span><span class="type-var">'a</span> <a href="#type-handler">handler</a></span></span></code></div><div class="spec-doc"><p><code>bidirectional_streaming ~handler write read</code> sets up the sending and receiving logic using <code>write</code> and <code>read</code>, then calls <code>handler</code> with a writer pipe and a reader pipe, for sending and receiving payloads to and from the server.</p><p>The stream is closed when the deferred returned by the handler becomes determined.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-client_streaming" class="anchored"><a href="#val-client_streaming" class="anchor"></a><code><span><span class="keyword">val</span> client_streaming : | ||
<span>handler:<span>( <span><span>string <span class="xref-unresolved">Async</span>.Pipe.Writer.t</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <span class="xref-unresolved">Async</span>.Deferred.t</span> )</span> <span class="arrow">-></span></span> | ||
<span><span class="type-var">'a</span> <a href="#type-handler">handler</a></span></span></code></div><div class="spec-doc"><p><code>client_streaming ~handler write read</code> sets up the sending and receiving logic using <code>write</code> and <code>read</code>, then calls <code>handler</code> with a writer pipe to send payloads to the server.</p><p>The stream is closed when the deferred returned by the handler becomes determined.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-server_streaming" class="anchored"><a href="#val-server_streaming" class="anchor"></a><code><span><span class="keyword">val</span> server_streaming : | ||
<span>handler:<span>( <span><span>string <span class="xref-unresolved">Async</span>.Pipe.Reader.t</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <span class="xref-unresolved">Async</span>.Deferred.t</span> )</span> <span class="arrow">-></span></span> | ||
<span><span class="type-var">'a</span> <span class="xref-unresolved">Async</span>.Deferred.t</span>)</span> <span class="arrow">-></span></span> | ||
<span><span class="type-var">'a</span> <a href="#type-handler">handler</a></span></span></code></div><div class="spec-doc"><p><code>bidirectional_streaming ~handler write read</code> sets up the sending and receiving logic using <code>write</code> and <code>read</code>, then calls <code>handler</code> with a writer pipe and a reader pipe, for sending and receiving payloads to and from the server.</p><p>The stream is closed when the deferred returned by the handler becomes determined.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-client_streaming"><a href="#val-client_streaming" class="anchor"></a><code><span><span class="keyword">val</span> client_streaming : | ||
<span>handler: | ||
<span>(<span><span>string <span class="xref-unresolved">Async</span>.Pipe.Writer.t</span> <span class="arrow">-></span></span> | ||
<span><span><span>string option</span> <span class="xref-unresolved">Async</span>.Deferred.t</span> <span class="arrow">-></span></span> | ||
<span><span class="type-var">'a</span> <span class="xref-unresolved">Async</span>.Deferred.t</span>)</span> <span class="arrow">-></span></span> | ||
<span><span class="type-var">'a</span> <a href="#type-handler">handler</a></span></span></code></div><div class="spec-doc"><p><code>client_streaming ~handler write read</code> sets up the sending and receiving logic using <code>write</code> and <code>read</code>, then calls <code>handler</code> with a writer pipe to send payloads to the server.</p><p>The stream is closed when the deferred returned by the handler becomes determined.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-server_streaming"><a href="#val-server_streaming" class="anchor"></a><code><span><span class="keyword">val</span> server_streaming : | ||
<span>handler:<span>(<span><span>string <span class="xref-unresolved">Async</span>.Pipe.Reader.t</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <span class="xref-unresolved">Async</span>.Deferred.t</span>)</span> <span class="arrow">-></span></span> | ||
<span>encoded_request:string <span class="arrow">-></span></span> | ||
<span><span class="type-var">'a</span> <a href="#type-handler">handler</a></span></span></code></div><div class="spec-doc"><p><code>server_streaming ~handler encoded_request write read</code> sets up the sending and receiving logic using <code>write</code> and <code>read</code>, then sends <code>encoded_request</code> and calls <code>handler</code> with a pipe of responses.</p><p>The stream is closed when the deferred returned by the handler becomes determined.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-unary" class="anchored"><a href="#val-unary" class="anchor"></a><code><span><span class="keyword">val</span> unary : | ||
<span>handler:<span>( <span><span>string option</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <span class="xref-unresolved">Async</span>.Deferred.t</span> )</span> <span class="arrow">-></span></span> | ||
<span><span class="type-var">'a</span> <a href="#type-handler">handler</a></span></span></code></div><div class="spec-doc"><p><code>server_streaming ~handler encoded_request write read</code> sets up the sending and receiving logic using <code>write</code> and <code>read</code>, then sends <code>encoded_request</code> and calls <code>handler</code> with a pipe of responses.</p><p>The stream is closed when the deferred returned by the handler becomes determined.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-unary"><a href="#val-unary" class="anchor"></a><code><span><span class="keyword">val</span> unary : | ||
<span>handler:<span>(<span><span>string option</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <span class="xref-unresolved">Async</span>.Deferred.t</span>)</span> <span class="arrow">-></span></span> | ||
<span>encoded_request:string <span class="arrow">-></span></span> | ||
<span><span class="type-var">'a</span> <a href="#type-handler">handler</a></span></span></code></div><div class="spec-doc"><p><code>unary ~handler ~encoded_request</code> sends the encoded request to the server . When the response is received, the handler is called with an option response. The response is is None if the server sent an empty response.</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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Client (grpc-async.Grpc_async.Client)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.1.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../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">grpc-async</a> » <a href="../index.html">Grpc_async</a> » Client</nav><header class="odoc-preamble"><h1>Module <code><span>Grpc_async.Client</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module" id="module-Rpc" class="anchored"><a href="#module-Rpc" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Rpc/index.html">Rpc</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec type" id="type-response_handler" class="anchored"><a href="#type-response_handler" class="anchor"></a><code><span><span class="keyword">type</span> response_handler</span><span> = <span class="xref-unresolved">H2</span>.Client_connection.response_handler</span></code></div></div><div class="odoc-spec"><div class="spec type" id="type-do_request" class="anchored"><a href="#type-do_request" class="anchor"></a><code><span><span class="keyword">type</span> do_request</span><span> = | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Client (grpc-async.Grpc_async.Client)</title><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.0"/><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">grpc-async</a> » <a href="../index.html">Grpc_async</a> » Client</nav><header class="odoc-preamble"><h1>Module <code><span>Grpc_async.Client</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Rpc"><a href="#module-Rpc" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Rpc/index.html">Rpc</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-response_handler"><a href="#type-response_handler" class="anchor"></a><code><span><span class="keyword">type</span> response_handler</span><span> = <span class="xref-unresolved">H2</span>.Client_connection.response_handler</span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-do_request"><a href="#type-do_request" class="anchor"></a><code><span><span class="keyword">type</span> do_request</span><span> = | ||
<span>?flush_headers_immediately:bool <span class="arrow">-></span></span> | ||
<span>?trailers_handler:<span>( <span><span class="xref-unresolved">H2</span>.Headers.t <span class="arrow">-></span></span> unit )</span> <span class="arrow">-></span></span> | ||
<span>?trailers_handler:<span>(<span><span class="xref-unresolved">H2</span>.Headers.t <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span> | ||
<span><span class="xref-unresolved">H2</span>.Request.t <span class="arrow">-></span></span> | ||
<span>response_handler:<a href="#type-response_handler">response_handler</a> <span class="arrow">-></span></span> | ||
<span class="xref-unresolved">H2</span>.Body.Writer.t</span></code></div><div class="spec-doc"><p><code>do_request</code> is the type of a function that performs the request</p></div></div><div class="odoc-spec"><div class="spec value" id="val-call" class="anchored"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call : | ||
<span class="xref-unresolved">H2</span>.Body.Writer.t</span></code></div><div class="spec-doc"><p><code>do_request</code> is the type of a function that performs the request</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-call"><a href="#val-call" class="anchor"></a><code><span><span class="keyword">val</span> call : | ||
<span>service:string <span class="arrow">-></span></span> | ||
<span>rpc:string <span class="arrow">-></span></span> | ||
<span>?scheme:string <span class="arrow">-></span></span> | ||
<span>handler:<span><span class="type-var">'a</span> <a href="Rpc/index.html#type-handler">Rpc.handler</a></span> <span class="arrow">-></span></span> | ||
<span>do_request:<a href="#type-do_request">do_request</a> <span class="arrow">-></span></span> | ||
<span>?headers:<span class="xref-unresolved">H2</span>.Headers.t <span class="arrow">-></span></span> | ||
<span>unit <span class="arrow">-></span></span> | ||
<span><span><span>( <span class="type-var">'a</span> * <a href="../../../grpc/Grpc/Status/index.html#type-t">Grpc.Status.t</a>, <a href="../../../grpc/Grpc/Status/index.html#type-t">Grpc.Status.t</a> )</span> <span class="xref-unresolved">Core</span>._result</span> <span class="xref-unresolved">Async</span>.Deferred.t</span></span></code></div><div class="spec-doc"><p><code>call ~service ~rpc ~handler ~do_request ()</code> calls the rpc endpoint given by <code>service</code> and <code>rpc</code> using the <code>do_request</code> function. The <code>handler</code> is called when this request is set up to send and receive data.</p></div></div></div></body></html> | ||
<span><span><span>(<span class="type-var">'a</span> * <a href="../../../grpc/Grpc/Status/index.html#type-t">Grpc.Status.t</a>, <span class="xref-unresolved">H2</span>.Status.t)</span> <span class="xref-unresolved">Core</span>._result</span> <span class="xref-unresolved">Async</span>.Deferred.t</span></span></code></div><div class="spec-doc"><p><code>call ~service ~rpc ~handler ~do_request ()</code> calls the rpc endpoint given by <code>service</code> and <code>rpc</code> using the <code>do_request</code> function. The <code>handler</code> is called when this request is set up to send and receive data.</p></div></div></div></body></html> |
Oops, something went wrong.