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Β§
- Activated
Listener π - A
Listenerthat yields a single pre-connected socket, then blocks forever. - Cfsctl
Service π - Varlink service implementation backing the
org.composefs.Repository(and, with theocifeature,org.composefs.Oci) interfaces. - Fsck
Reply - Result of a repository consistency check, mirrored for the varlink wire format.
- GcReply
- Result of a garbage-collection run for the varlink wire format.
- Handle
Entry π - A single entry in the serviceβs open-repository table.
- Image
Objects Reply - Reply listing the objects referenced by a single image.
- Init
Repository Reply - Reply from initializing a repository.
- Mount
Params - Options for a
Mountcall. All fields are optional for forward compatibility β new mount options can be added without breaking the wire format. - Mount
Reply - Reply for a
Mountcall β just an fd_index referencing the mount fd. - Open
Options π - Process-wide repository open options, fixed at startup.
- Open
Repository Reply - Reply carrying an opaque repository handle.
EnumsΒ§
- Open
Repo π - An opened repository, monomorphized over its detected hash algorithm.
- Repository
Error - Errors that may be returned by the
org.composefs.Repositoryinterface.
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
pathwith the given algorithm. - run_
inspect π - Inspect a single OCI image.
- run_
list_ πimages - OCI helper functions backing the
org.composefs.Ociinterface, gated behind theocifeature. - 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
serviceeither on a systemd-activated connected socket or by binding a fresh Unix socket ataddress. - serve_
activated π - Serve
serviceon an already-obtained socket-activated listener. - try_
activated_ πlistener - Try to build an
ActivatedListenerfrom a socket-activated fd.