pub enum Request {
Show 15 variants
Hello,
Stat {
path: String,
},
List {
path: String,
offset: u32,
limit: u32,
},
Read {
path: String,
offset: u64,
len: u32,
},
Write {
path: String,
data: Vec<u8>,
},
Append {
path: String,
data: Vec<u8>,
},
Mkdir {
path: String,
parents: bool,
},
Rename {
from: String,
to: String,
},
Delete {
path: String,
recursive: bool,
},
Replace {
from: String,
to: String,
},
Realpath {
path: String,
},
SetMeta {
path: String,
mode: u32,
mtime_ms: i64,
},
Sync {
path: String,
},
Procs {
top: u32,
filter: String,
},
PaneProcs {
block_id: String,
session: String,
},
}Expand description
What a request asks for.
Variants§
Hello
The handshake: answered with Reply::Hello.
Stat
List
Up to limit entries of a directory from offset, sorted by name.
Read
Up to len bytes from offset (at most MAX_READ).
Write
Replace the file with data, atomically: a temp file beside it,
synced, then renamed over it, keeping an existing file’s mode.
Append
Add data to the end of an existing file (at most MAX_WRITE): a
big upload, a piece at a time, into a temp file that is then renamed
into place. Never creates the file.
Mkdir
Rename
Delete
Replace
Rename the file from over the file to in one step: what was at
to is gone only once from is there (never a folder, either side).
Realpath
path with every link and .. resolved: Reply::Path.
SetMeta
Give a file its permission bits (mode, 0 to leave them) and its
modification time (mtime_ms, 0 to leave it).
Sync
Flush a file’s contents to disk (before a moved source goes).
Procs
The host’s processes for Tower (crate::procs): the top busiest by
CPU and the top largest by memory among those whose name or PID
matches every word of filter. Reply::Procs.
PaneProcs
What one AgentMux pane’s processes on this host use, for its stats
badge (crate::procs::Sampler::pane): the shell of durable session
and what it started, else the processes whose environment holds
AGENTMUX_BLOCKID=<block_id>. Either may be empty. Reply::PaneProcs.