How ceph/go-ceph works
Project type and purpose
• This is a Go-based library (go-ceph) that provides native Go bindings to Ceph’s C APIs (librados, librbd, libcephfs) and to the RADOSGW admin REST API.
• It is not an application with a frontend/backend split, but a modular SDK used by other Go projects to interact with a Ceph cluster.
File structure
• Top-level sub-packages:
• cephfs/ – Go bindings for CephFS
• rados/ – Go bindings for librados (cluster I/O)
• rbd/ – Go bindings for librbd (block device)
• rgw/admin/ – Go client for RADOSGW admin operations (HTTP-REST)
• Cross-cutting “support” packages:
• common/ – shared admin interfaces, command abstractions, logging
• internal/ – cgo helpers (cutil, dlsym), error utilities, callbacks, retry logic, tracing
• Other directories:
• testing/containers/ – Dockerfiles for integration tests
• docs/, .github/, Makefile – CI, docs, release process, formatting, test scripts
README for additional insights
• Confirms use of cgo to bridge Go ↔ C.
• Describes build-tags for different Ceph releases (pacific, quincy, etc.).
• Notes that the library dynamically links against Ceph system libraries at runtime.
• Describes integration tests via Docker.