mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 01:45:44 +03:00
document endpoint
This commit is contained in:
@@ -54,6 +54,85 @@ allocation was placed.
|
||||
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dt>Description</dt>
|
||||
<dd>
|
||||
Stream contents of a file in an allocation directory.
|
||||
</dd>
|
||||
|
||||
<dt>Method</dt>
|
||||
<dd>GET</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/v1/client/fs/stream/<Allocation-ID>`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li>
|
||||
<span class="param">path</span>
|
||||
<span class="param-flags">required</span>
|
||||
The path relative to the root of the allocation directory. It
|
||||
defaults to `/`
|
||||
</li>
|
||||
<li>
|
||||
<span class="param">offset</span>
|
||||
The offset to start streaming from. Defaults to 0.
|
||||
</li>
|
||||
<li>
|
||||
<span class="param">origin</span>
|
||||
Origin can be either "start" or "end" and applies the offset relative to
|
||||
either the start or end of the file respectively. Defaults to "start".
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
|
||||
```
|
||||
...
|
||||
{
|
||||
"File":"alloc/logs/redis.stdout.0",
|
||||
"Offset":3604480
|
||||
"Data": "NTMxOTMyCjUzMTkzMwo1MzE5MzQKNTMx..."
|
||||
}
|
||||
{
|
||||
"File":"alloc/logs/redis.stdout.0",
|
||||
"FileEvent": "file deleted"
|
||||
}
|
||||
```
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>Field Reference</dt>
|
||||
<dd>
|
||||
The return value is a stream of frames. These frames contain the following
|
||||
fields:
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<span class="param">Data</span>
|
||||
A base64 encoding of the bytes being streamed.
|
||||
</li>
|
||||
<li>
|
||||
<span class="param">FileEvent</span>
|
||||
An event that could cause a change in the streams position. The possible
|
||||
values are "file deleted" and "file truncated".
|
||||
</li>
|
||||
<li>
|
||||
<span class="param">Offset</span>
|
||||
Offset is the offset into the stream.
|
||||
</li>
|
||||
<li>
|
||||
<span class="param">File</span>
|
||||
The name of the file being streamed.
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dt>Description</dt>
|
||||
<dd>
|
||||
|
||||
Reference in New Issue
Block a user