Skip to main content

Module varlink

Module varlink 

Source
Expand description

Varlink RPC service exposing repository operations over a Unix socket. Varlink RPC service for cfsctl.

Exposes a subset of repository operations over a Unix-socket varlink interface (org.composefs.Repository) so that integration tests and external callers can consume structured replies instead of scraping the human-oriented CLI output.

Repositories are accessed through opaque u64 handles: a client calls OpenRepository to obtain a handle, passes it to every subsequent method, and frees it with CloseRepository. No repository is opened at startup, so every call must carry a handle. Each handle stores an already-opened Repository<ObjectID> monomorphized over the digest algorithm detected at open time, wrapped in an Arc so the streaming Pull method can move an owned clone into its 'static reply stream.

The zlink server serializes Service::handle calls (a single task holds one &mut self borrow at a time), so the handle table is a plain HashMap with no interior locking.

ModulesΒ§

oci
Varlink support for the OCI interface (org.composefs.Oci).
proxy
Typed Rust client bindings (the native-API mirror of the on-the-wire varlink interfaces). These let a Rust consumer β€” the integration tests today, and a future cfsctl-as-client β€” call the service with generated, type-checked proxy methods, in addition to the wire protocol exercised by external clients such as varlinkctl.
service_impl πŸ”’

StructsΒ§

ActivatedListener πŸ”’
A Listener that yields a single pre-connected socket, then blocks forever.
CfsctlService πŸ”’
Varlink service implementation backing the org.composefs.Repository (and, with the oci feature, org.composefs.Oci) interfaces.
FsckReply
Result of a repository consistency check, mirrored for the varlink wire format.
GcReply
Result of a garbage-collection run for the varlink wire format.
HandleEntry πŸ”’
A single entry in the service’s open-repository table.
ImageObjectsReply
Reply listing the objects referenced by a single image.
InitRepositoryReply
Reply from initializing a repository.
MountParams
Options for a Mount call. All fields are optional for forward compatibility β€” new mount options can be added without breaking the wire format.
MountReply
Reply for a Mount call β€” just an fd_index referencing the mount fd.
OpenOptions πŸ”’
Process-wide repository open options, fixed at startup.
OpenRepositoryReply
Reply carrying an opaque repository handle.

EnumsΒ§

OpenRepo πŸ”’
An opened repository, monomorphized over its detected hash algorithm.
RepositoryError
Errors that may be returned by the org.composefs.Repository interface.

FunctionsΒ§

run_compute_id πŸ”’
Compute the composefs image ID for an OCI image.
run_fsck πŸ”’
Open the repository and run an fsck.
run_gc πŸ”’
Run garbage collection (or a dry run) on a repository.
run_image_objects πŸ”’
Collect the objects referenced by an image.
run_init_repository πŸ”’
Initialize (or verify) a repository at path with the given algorithm.
run_inspect πŸ”’
Inspect a single OCI image.
run_list_images πŸ”’
OCI helper functions backing the org.composefs.Oci interface, gated behind the oci feature.
run_mount πŸ”’
run_oci_fsck πŸ”’
Run an OCI-aware consistency check on a repository.
run_oci_mount πŸ”’
run_tag πŸ”’
Tag a manifest digest with a name.
run_untag πŸ”’
Remove a tag.
serve πŸ”’
Serve service either on a systemd-activated connected socket or by binding a fresh Unix socket at address.
serve_activated πŸ”’
Serve service on an already-obtained socket-activated listener.
try_activated_listener πŸ”’
Try to build an ActivatedListener from a socket-activated fd.