Skip to main content

Crate loonfs_client

Crate loonfs_client 

Source
Expand description

Async HTTP client for a LoonFS server.

Use this crate when your process should talk to a hosted LoonFS runtime instead of embedding the runtime directly. The client keeps paths simple: pass a NamespacePath for filesystem operations and use explicit commit helpers when you need retry control.

The public surface is Client and the values it takes: ClientConfig, ClientError, NamespacePath, and the per-operation option structs re-exported below. There is no transport abstraction to implement — a process that wants the runtime in-process uses the loonfs crate instead, and the two surfaces share one definition of every option struct (they live in loonfs-api) so their arguments cannot drift apart.

Re-exports§

pub use ClientError as Error;

Structs§

Client
Async HTTP client for LoonFS.
ClientConfig
Client configuration loaded from TOML or built by the caller.
CopyOptions
Per-operation options, defined once in loonfs-api and shared with the embedded loonfs runtime so the two surfaces cannot drift a field apart. Options for copying a file path.
CreateDirectoryOptions
Per-operation options, defined once in loonfs-api and shared with the embedded loonfs runtime so the two surfaces cannot drift a field apart. Options for creating a directory.
DeleteOptions
Per-operation options, defined once in loonfs-api and shared with the embedded loonfs runtime so the two surfaces cannot drift a field apart. Options for deleting a path.
DirectDownloadStream
One direct download response, delivered in bounded chunks and verified against the content reference carried by its grant.
MoveOptions
Per-operation options, defined once in loonfs-api and shared with the embedded loonfs runtime so the two surfaces cannot drift a field apart. Options for moving a path.
MultipartUploadResume
What a caller keeps so an interrupted direct multipart upload can pick up rather than start over.
NamespacePath
A path qualified by namespace.
PayloadSource
Where one put reads its payload, and what it knows about it up front.
PutFileOptions
Per-operation options, defined once in loonfs-api and shared with the embedded loonfs runtime so the two surfaces cannot drift a field apart. Options for writing a file path.
RestoreRevisionOptions
Per-operation options, defined once in loonfs-api and shared with the embedded loonfs runtime so the two surfaces cannot drift a field apart. Options for restoring a file revision by path.
UndeleteOptions
Per-operation options, defined once in loonfs-api and shared with the embedded loonfs runtime so the two surfaces cannot drift a field apart. Options for recovering a deleted file or subtree.

Enums§

ClientError
Error returned by the blocking HTTP client.

Constants§

STREAMING_PUT_MIN_BYTES
Payload size from which a put stops holding its bytes whole.

Traits§

MultipartUploadJournal
Where a caller records a direct multipart upload as it happens, so a later run can resume it.

Type Aliases§

PayloadStream
A payload delivered in pieces, for a put that must not hold it whole.
Result
Result type returned by the client.