How abhinavs1920/gdrive works
GDriveDisk authenticates a local user with Google, builds a Drive client, mounts a FUSE filesystem, and serves filesystem reads and writes through Google Drive. Reads use the handler’s in-memory index/cache before downloading; writes use temporary local files before upload. Quota and directory metadata are refreshed from Drive. Redis caching, Bloom lookup, and adaptive prefetching are documented capabilities, but their wiring is not evidenced in the sampled runtime source, so they remain separate optional components.
Components 15
Application Entry
- Application Main
cmd/main.go
Authentication
- Google OAuth
- Drive Authentication
internal/drive/auth.go - Drive Service
internal/drive/drive_ops.go
Virtual Filesystem
- FUSE Runtime
- Filesystem Handler
internal/fs/fuse_handler.go - Drive File Index
internal/fs/fuse_handler.go - Memory Read Cache
internal/fs/fuse_handler.go - Temporary Files
internal/fs/fuse_handler.go
Storage Acceleration
- Redis Cache
internal/cache/redis_cache.go - Bloom Lookup
internal/fs - Adaptive Prefetch
internal/fs
Other components
- Local User
- Google Drive
- Redis Server
Connections 17
- Local User → Application Main: starts application
- Application Main → Drive Authentication: authenticates
- Drive Authentication → Google OAuth: authorizes user
- Application Main → Drive Service: creates service
- Application Main → Drive Service: uploads test
- Application Main → FUSE Runtime: mounts filesystem
- Local User → FUSE Runtime: accesses mount
- FUSE Runtime → Filesystem Handler: dispatches operations
- Filesystem Handler → Memory Read Cache: reads cache
- Filesystem Handler → Drive File Index: reads index
- Filesystem Handler → Drive Service: downloads files
- Filesystem Handler → Drive Service: uploads files
- Filesystem Handler → Drive Service: refreshes quota
- Filesystem Handler → Temporary Files: writes temporary data
- Filesystem Handler → Drive File Index: refreshes index
- Drive Service → Google Drive: calls Drive API
- Redis Cache → Redis Server: stores cached data