Skip to content

Commit 9fd5db9

Browse files
author
Pat Hickey
committed
generate markdown
1 parent 0c3a7dd commit 9fd5db9

File tree

1 file changed

+61
-116
lines changed

1 file changed

+61
-116
lines changed

proxy.md

Lines changed: 61 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,26 @@ outgoing HTTP requests.</p>
66
<ul>
77
<li>Imports:
88
<ul>
9-
<li>interface <a href="#wasi:clocks_wall_clock"><code>wasi:clocks/wall-clock</code></a></li>
10-
<li>interface <a href="#wasi:io_poll"><code>wasi:io/poll</code></a></li>
11-
<li>interface <a href="#wasi:clocks_monotonic_clock"><code>wasi:clocks/monotonic-clock</code></a></li>
12-
<li>interface <a href="#wasi:clocks_timezone"><code>wasi:clocks/timezone</code></a></li>
13-
<li>interface <a href="#wasi:random_random"><code>wasi:random/random</code></a></li>
14-
<li>interface <a href="#wasi:io_streams"><code>wasi:io/streams</code></a></li>
15-
<li>interface <a href="#wasi:cli_stdout"><code>wasi:cli/stdout</code></a></li>
16-
<li>interface <a href="#wasi:cli_stderr"><code>wasi:cli/stderr</code></a></li>
17-
<li>interface <a href="#wasi:cli_stdin"><code>wasi:cli/stdin</code></a></li>
18-
<li>interface <a href="#wasi:http_types"><code>wasi:http/types</code></a></li>
19-
<li>interface <a href="#wasi:http_outgoing_handler"><code>wasi:http/outgoing-handler</code></a></li>
9+
<li>interface <a href="#wasi:clocks_wall_clock_0.2.0_rc_2023_11_10"><code>wasi:clocks/wall-clock@0.2.0-rc-2023-11-10</code></a></li>
10+
<li>interface <a href="#wasi:io_poll_0.2.0_rc_2023_11_10"><code>wasi:io/poll@0.2.0-rc-2023-11-10</code></a></li>
11+
<li>interface <a href="#wasi:clocks_monotonic_clock_0.2.0_rc_2023_11_10"><code>wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10</code></a></li>
12+
<li>interface <a href="#wasi:random_random_0.2.0_rc_2023_11_10"><code>wasi:random/random@0.2.0-rc-2023-11-10</code></a></li>
13+
<li>interface <a href="#wasi:io_error_0.2.0_rc_2023_11_10"><code>wasi:io/error@0.2.0-rc-2023-11-10</code></a></li>
14+
<li>interface <a href="#wasi:io_streams_0.2.0_rc_2023_11_10"><code>wasi:io/streams@0.2.0-rc-2023-11-10</code></a></li>
15+
<li>interface <a href="#wasi:cli_stdout_0.2.0_rc_2023_11_10"><code>wasi:cli/stdout@0.2.0-rc-2023-11-10</code></a></li>
16+
<li>interface <a href="#wasi:cli_stderr_0.2.0_rc_2023_11_10"><code>wasi:cli/stderr@0.2.0-rc-2023-11-10</code></a></li>
17+
<li>interface <a href="#wasi:cli_stdin_0.2.0_rc_2023_11_10"><code>wasi:cli/stdin@0.2.0-rc-2023-11-10</code></a></li>
18+
<li>interface <a href="#wasi:http_types_0.2.0_rc_2023_11_10"><code>wasi:http/types@0.2.0-rc-2023-11-10</code></a></li>
19+
<li>interface <a href="#wasi:http_outgoing_handler_0.2.0_rc_2023_11_10"><code>wasi:http/outgoing-handler@0.2.0-rc-2023-11-10</code></a></li>
2020
</ul>
2121
</li>
2222
<li>Exports:
2323
<ul>
24-
<li>interface <a href="#wasi:http_incoming_handler"><code>wasi:http/incoming-handler</code></a></li>
24+
<li>interface <a href="#wasi:http_incoming_handler_0.2.0_rc_2023_11_10"><code>wasi:http/incoming-handler@0.2.0-rc-2023-11-10</code></a></li>
2525
</ul>
2626
</li>
2727
</ul>
28-
<h2><a name="wasi:clocks_wall_clock">Import interface wasi:clocks/wall-clock</a></h2>
28+
<h2><a name="wasi:clocks_wall_clock_0.2.0_rc_2023_11_10">Import interface wasi:clocks/wall-clock@0.2.0-rc-2023-11-10</a></h2>
2929
<p>WASI Wall Clock is a clock API intended to let users query the current
3030
time. The name &quot;wall&quot; makes an analogy to a &quot;clock on the wall&quot;, which
3131
is not necessarily monotonic as it may be reset.</p>
@@ -66,7 +66,7 @@ also known as <a href="https://en.wikipedia.org/wiki/Unix_time">Unix Time</a>.</
6666
<ul>
6767
<li><a name="resolution.0"></a> <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
6868
</ul>
69-
<h2><a name="wasi:io_poll">Import interface wasi:io/poll</a></h2>
69+
<h2><a name="wasi:io_poll_0.2.0_rc_2023_11_10">Import interface wasi:io/poll@0.2.0-rc-2023-11-10</a></h2>
7070
<p>A poll API intended to let users wait for I/O events on multiple handles
7171
at once.</p>
7272
<hr />
@@ -116,7 +116,7 @@ being reaedy for I/O.</p>
116116
<ul>
117117
<li><a name="poll.0"></a> list&lt;<code>u32</code>&gt;</li>
118118
</ul>
119-
<h2><a name="wasi:clocks_monotonic_clock">Import interface wasi:clocks/monotonic-clock</a></h2>
119+
<h2><a name="wasi:clocks_monotonic_clock_0.2.0_rc_2023_11_10">Import interface wasi:clocks/monotonic-clock@0.2.0-rc-2023-11-10</a></h2>
120120
<p>WASI Monotonic Clock is a clock API intended to let users measure elapsed
121121
time.</p>
122122
<p>It is intended to be portable at least between Unix-family platforms and
@@ -177,72 +177,7 @@ occured.</p>
177177
<ul>
178178
<li><a name="subscribe_duration.0"></a> own&lt;<a href="#pollable"><a href="#pollable"><code>pollable</code></a></a>&gt;</li>
179179
</ul>
180-
<h2><a name="wasi:clocks_timezone">Import interface wasi:clocks/timezone</a></h2>
181-
<hr />
182-
<h3>Types</h3>
183-
<h4><a name="datetime"><code>type datetime</code></a></h4>
184-
<p><a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></p>
185-
<p>
186-
#### <a name="timezone_display">`record timezone-display`</a>
187-
<p>Information useful for displaying the timezone of a specific <a href="#datetime"><code>datetime</code></a>.</p>
188-
<p>This information may vary within a single <code>timezone</code> to reflect daylight
189-
saving time adjustments.</p>
190-
<h5>Record Fields</h5>
191-
<ul>
192-
<li>
193-
<p><a name="timezone_display.utc_offset"><a href="#utc_offset"><code>utc-offset</code></a></a>: <code>s32</code></p>
194-
<p>The number of seconds difference between UTC time and the local
195-
time of the timezone.
196-
<p>The returned value will always be less than 86400 which is the
197-
number of seconds in a day (24<em>60</em>60).</p>
198-
<p>In implementations that do not expose an actual time zone, this
199-
should return 0.</p>
200-
</li>
201-
<li>
202-
<p><a name="timezone_display.name"><code>name</code></a>: <code>string</code></p>
203-
<p>The abbreviated name of the timezone to display to a user. The name
204-
`UTC` indicates Coordinated Universal Time. Otherwise, this should
205-
reference local standards for the name of the time zone.
206-
<p>In implementations that do not expose an actual time zone, this
207-
should be the string <code>UTC</code>.</p>
208-
<p>In time zones that do not have an applicable name, a formatted
209-
representation of the UTC offset may be returned, such as <code>-04:00</code>.</p>
210-
</li>
211-
<li>
212-
<p><a name="timezone_display.in_daylight_saving_time"><code>in-daylight-saving-time</code></a>: <code>bool</code></p>
213-
<p>Whether daylight saving time is active.
214-
<p>In implementations that do not expose an actual time zone, this
215-
should return false.</p>
216-
</li>
217-
</ul>
218-
<hr />
219-
<h3>Functions</h3>
220-
<h4><a name="display"><code>display: func</code></a></h4>
221-
<p>Return information needed to display the given <a href="#datetime"><code>datetime</code></a>. This includes
222-
the UTC offset, the time zone name, and a flag indicating whether
223-
daylight saving time is active.</p>
224-
<p>If the timezone cannot be determined for the given <a href="#datetime"><code>datetime</code></a>, return a
225-
<a href="#timezone_display"><code>timezone-display</code></a> for <code>UTC</code> with a <a href="#utc_offset"><code>utc-offset</code></a> of 0 and no daylight
226-
saving time.</p>
227-
<h5>Params</h5>
228-
<ul>
229-
<li><a name="display.when"><code>when</code></a>: <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
230-
</ul>
231-
<h5>Return values</h5>
232-
<ul>
233-
<li><a name="display.0"></a> <a href="#timezone_display"><a href="#timezone_display"><code>timezone-display</code></a></a></li>
234-
</ul>
235-
<h4><a name="utc_offset"><code>utc-offset: func</code></a></h4>
236-
<p>The same as <a href="#display"><code>display</code></a>, but only return the UTC offset.</p>
237-
<h5>Params</h5>
238-
<ul>
239-
<li><a name="utc_offset.when"><code>when</code></a>: <a href="#datetime"><a href="#datetime"><code>datetime</code></a></a></li>
240-
</ul>
241-
<h5>Return values</h5>
242-
<ul>
243-
<li><a name="utc_offset.0"></a> <code>s32</code></li>
244-
</ul>
245-
<h2><a name="wasi:random_random">Import interface wasi:random/random</a></h2>
180+
<h2><a name="wasi:random_random_0.2.0_rc_2023_11_10">Import interface wasi:random/random@0.2.0-rc-2023-11-10</a></h2>
246181
<p>WASI Random is a random data API.</p>
247182
<p>It is intended to be portable at least between Unix-family platforms and
248183
Windows.</p>
@@ -275,18 +210,41 @@ represented as a <code>u64</code>.</p>
275210
<ul>
276211
<li><a name="get_random_u64.0"></a> <code>u64</code></li>
277212
</ul>
278-
<h2><a name="wasi:io_streams">Import interface wasi:io/streams</a></h2>
213+
<h2><a name="wasi:io_error_0.2.0_rc_2023_11_10">Import interface wasi:io/error@0.2.0-rc-2023-11-10</a></h2>
214+
<hr />
215+
<h3>Types</h3>
216+
<h4><a name="error"><code>resource error</code></a></h4>
217+
<hr />
218+
<h3>Functions</h3>
219+
<h4><a name="method_error.to_debug_string"><code>[method]error.to-debug-string: func</code></a></h4>
220+
<p>Returns a string that is suitable to assist humans in debugging
221+
this error.</p>
222+
<p>WARNING: The returned string should not be consumed mechanically!
223+
It may change across platforms, hosts, or other implementation
224+
details. Parsing this string is a major platform-compatibility
225+
hazard.</p>
226+
<h5>Params</h5>
227+
<ul>
228+
<li><a name="method_error.to_debug_string.self"><code>self</code></a>: borrow&lt;<a href="#error"><a href="#error"><code>error</code></a></a>&gt;</li>
229+
</ul>
230+
<h5>Return values</h5>
231+
<ul>
232+
<li><a name="method_error.to_debug_string.0"></a> <code>string</code></li>
233+
</ul>
234+
<h2><a name="wasi:io_streams_0.2.0_rc_2023_11_10">Import interface wasi:io/streams@0.2.0-rc-2023-11-10</a></h2>
279235
<p>WASI I/O is an I/O abstraction API which is currently focused on providing
280236
stream types.</p>
281237
<p>In the future, the component model is expected to add built-in stream types;
282238
when it does, they are expected to subsume this API.</p>
283239
<hr />
284240
<h3>Types</h3>
285-
<h4><a name="pollable"><code>type pollable</code></a></h4>
286-
<p><a href="#pollable"><a href="#pollable"><code>pollable</code></a></a></p>
241+
<h4><a name="error"><code>type error</code></a></h4>
242+
<p><a href="#error"><a href="#error"><code>error</code></a></a></p>
287243
<p>
288-
#### <a name="error">`resource error`</a>
289-
<h4><a name="stream_error"><code>variant stream-error</code></a></h4>
244+
#### <a name="pollable">`type pollable`</a>
245+
[`pollable`](#pollable)
246+
<p>
247+
#### <a name="stream_error">`variant stream-error`</a>
290248
<p>An error for input-stream and output-stream operations.</p>
291249
<h5>Variant Cases</h5>
292250
<ul>
@@ -306,20 +264,6 @@ future operations.
306264
<h4><a name="output_stream"><code>resource output-stream</code></a></h4>
307265
<hr />
308266
<h3>Functions</h3>
309-
<h4><a name="method_error.to_debug_string"><code>[method]error.to-debug-string: func</code></a></h4>
310-
<p>Returns a string that's suitable to assist humans in debugging this
311-
error.</p>
312-
<p>The returned string will change across platforms and hosts which
313-
means that parsing it, for example, would be a
314-
platform-compatibility hazard.</p>
315-
<h5>Params</h5>
316-
<ul>
317-
<li><a name="method_error.to_debug_string.self"><code>self</code></a>: borrow&lt;<a href="#error"><a href="#error"><code>error</code></a></a>&gt;</li>
318-
</ul>
319-
<h5>Return values</h5>
320-
<ul>
321-
<li><a name="method_error.to_debug_string.0"></a> <code>string</code></li>
322-
</ul>
323267
<h4><a name="method_input_stream.read"><code>[method]input-stream.read: func</code></a></h4>
324268
<p>Perform a non-blocking read from the stream.</p>
325269
<p>This function returns a list of bytes containing the read data,
@@ -590,7 +534,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
590534
<ul>
591535
<li><a name="method_output_stream.blocking_splice.0"></a> result&lt;<code>u64</code>, <a href="#stream_error"><a href="#stream_error"><code>stream-error</code></a></a>&gt;</li>
592536
</ul>
593-
<h2><a name="wasi:cli_stdout">Import interface wasi:cli/stdout</a></h2>
537+
<h2><a name="wasi:cli_stdout_0.2.0_rc_2023_11_10">Import interface wasi:cli/stdout@0.2.0-rc-2023-11-10</a></h2>
594538
<hr />
595539
<h3>Types</h3>
596540
<h4><a name="output_stream"><code>type output-stream</code></a></h4>
@@ -603,7 +547,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
603547
<ul>
604548
<li><a name="get_stdout.0"></a> own&lt;<a href="#output_stream"><a href="#output_stream"><code>output-stream</code></a></a>&gt;</li>
605549
</ul>
606-
<h2><a name="wasi:cli_stderr">Import interface wasi:cli/stderr</a></h2>
550+
<h2><a name="wasi:cli_stderr_0.2.0_rc_2023_11_10">Import interface wasi:cli/stderr@0.2.0-rc-2023-11-10</a></h2>
607551
<hr />
608552
<h3>Types</h3>
609553
<h4><a name="output_stream"><code>type output-stream</code></a></h4>
@@ -616,7 +560,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
616560
<ul>
617561
<li><a name="get_stderr.0"></a> own&lt;<a href="#output_stream"><a href="#output_stream"><code>output-stream</code></a></a>&gt;</li>
618562
</ul>
619-
<h2><a name="wasi:cli_stdin">Import interface wasi:cli/stdin</a></h2>
563+
<h2><a name="wasi:cli_stdin_0.2.0_rc_2023_11_10">Import interface wasi:cli/stdin@0.2.0-rc-2023-11-10</a></h2>
620564
<hr />
621565
<h3>Types</h3>
622566
<h4><a name="input_stream"><code>type input-stream</code></a></h4>
@@ -629,7 +573,7 @@ is ready for reading, before performing the <code>splice</code>.</p>
629573
<ul>
630574
<li><a name="get_stdin.0"></a> own&lt;<a href="#input_stream"><a href="#input_stream"><code>input-stream</code></a></a>&gt;</li>
631575
</ul>
632-
<h2><a name="wasi:http_types">Import interface wasi:http/types</a></h2>
576+
<h2><a name="wasi:http_types_0.2.0_rc_2023_11_10">Import interface wasi:http/types@0.2.0-rc-2023-11-10</a></h2>
633577
<p>This interface defines all of the types and methods for implementing
634578
HTTP Requests and Responses, both incoming and outgoing, as well as
635579
their headers, trailers, and bodies.</p>
@@ -644,7 +588,7 @@ their headers, trailers, and bodies.</p>
644588
#### <a name="output_stream">`type output-stream`</a>
645589
[`output-stream`](#output_stream)
646590
<p>
647-
#### <a name="stream_error">`type stream-error`</a>
591+
#### <a name="io_error">`type io-error`</a>
648592
[`error`](#error)
649593
<p>
650594
#### <a name="pollable">`type pollable`</a>
@@ -797,17 +741,18 @@ so they are provided as a list of bytes.
797741
<hr />
798742
<h3>Functions</h3>
799743
<h4><a name="http_error_code"><code>http-error-code: func</code></a></h4>
800-
<p>Attempts to extract a http-related <a href="#error"><code>error</code></a> from the stream <a href="#error"><code>error</code></a>
744+
<p>Attempts to extract a http-related <a href="#error"><code>error</code></a> from the wasi:io <a href="#error"><code>error</code></a>
801745
provided.</p>
802-
<p>Stream operations which return <a href="#stream_error.last_operation_failed"><code>stream-error::last-operation-failed</code></a> have
803-
a payload with more information about the operation that failed. This
804-
payload can be passed through to this function to see if there's
805-
http-related information about the error to return.</p>
806-
<p>Note that this function is fallible because not all stream-related errors
807-
are http-related errors.</p>
746+
<p>Stream operations which return
747+
<code>wasi:io/stream/stream-error::last-operation-failed</code> have a payload of
748+
type <code>wasi:io/error/error</code> with more information about the operation
749+
that failed. This payload can be passed through to this function to see
750+
if there's http-related information about the error to return.</p>
751+
<p>Note that this function is fallible because not all io-errors are
752+
http-related errors.</p>
808753
<h5>Params</h5>
809754
<ul>
810-
<li><a name="http_error_code.err"><code>err</code></a>: borrow&lt;<a href="#stream_error"><a href="#stream_error"><code>stream-error</code></a></a>&gt;</li>
755+
<li><a name="http_error_code.err"><code>err</code></a>: borrow&lt;<a href="#io_error"><a href="#io_error"><code>io-error</code></a></a>&gt;</li>
811756
</ul>
812757
<h5>Return values</h5>
813758
<ul>
@@ -1007,7 +952,7 @@ to reject invalid constructions of <a href="#outgoing_request"><code>outgoing-re
1007952
<p>Returns the resource corresponding to the outgoing Body for this
1008953
Request.</p>
1009954
<p>Returns success on the first call: the <a href="#outgoing_body"><code>outgoing-body</code></a> resource for
1010-
this <a href="#outgoing_response"><code>outgoing-response</code></a> can be retrieved at most once. Subsequent
955+
this <a href="#outgoing_request"><code>outgoing-request</code></a> can be retrieved at most once. Subsequent
1011956
calls will return error.</p>
1012957
<h5>Params</h5>
1013958
<ul>
@@ -1446,7 +1391,7 @@ but those will be reported by the <a href="#incoming_body"><code>incoming-body</
14461391
<ul>
14471392
<li><a name="method_future_incoming_response.get.0"></a> option&lt;result&lt;result&lt;own&lt;<a href="#incoming_response"><a href="#incoming_response"><code>incoming-response</code></a></a>&gt;, <a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>&gt;&gt;&gt;</li>
14481393
</ul>
1449-
<h2><a name="wasi:http_outgoing_handler">Import interface wasi:http/outgoing-handler</a></h2>
1394+
<h2><a name="wasi:http_outgoing_handler_0.2.0_rc_2023_11_10">Import interface wasi:http/outgoing-handler@0.2.0-rc-2023-11-10</a></h2>
14501395
<p>This interface defines a handler of outgoing HTTP Requests. It should be
14511396
imported by components which wish to make HTTP Requests.</p>
14521397
<hr />
@@ -1483,7 +1428,7 @@ through the <a href="#future_incoming_response"><code>future-incoming-response</
14831428
<ul>
14841429
<li><a name="handle.0"></a> result&lt;own&lt;<a href="#future_incoming_response"><a href="#future_incoming_response"><code>future-incoming-response</code></a></a>&gt;, <a href="#error_code"><a href="#error_code"><code>error-code</code></a></a>&gt;</li>
14851430
</ul>
1486-
<h2><a name="wasi:http_incoming_handler">Export interface wasi:http/incoming-handler</a></h2>
1431+
<h2><a name="wasi:http_incoming_handler_0.2.0_rc_2023_11_10">Export interface wasi:http/incoming-handler@0.2.0-rc-2023-11-10</a></h2>
14871432
<hr />
14881433
<h3>Types</h3>
14891434
<h4><a name="incoming_request"><code>type incoming-request</code></a></h4>

0 commit comments

Comments
 (0)