DriveRpcClient class

Issues OmnyDrive RPCs over a SessionMode.drive RemoteSession.

Requests are written as framed DriveMessages on the session's stdin and matched to their replies on stdout by a monotonic correlation id, so several requests may be in flight at once. Inbound bytes immediately replenish the node's send window, keeping large reads flowing under the channel's credit limit.

Constructors

DriveRpcClient(RemoteSession _session)
Wraps an already-open drive session.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future<void>
Closes the session and fails any in-flight requests.
delete(String path) Future<void>
Deletes path under the served root.
gitClone(String url, {String? branch, int? depth, bool bare = false}) Future<String>
Clones url into the served root, returning the resulting head SHA.
gitHead() Future<String>
Returns the current git head SHA of the served root.
gitSync({required String url, required String direction, required String baseline}) Future<Map<String, dynamic>>
Synchronizes the served git tree in direction from baseline. Returns the raw reply header (head, applied, optional publishedBranch / conflict).
manifest() Future<Map<String, dynamic>>
Fetches the served directory manifest as a JSON map.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(String path) Future<Uint8List>
Reads the bytes of path under the served root.
toString() String
A string representation of this object.
inherited
write(String path, List<int> bytes) Future<void>
Writes bytes to path under the served root.

Operators

operator ==(Object other) bool
The equality operator.
inherited