Files
beads/internal/rpc/server.go
Steve Yegge 0c737025b5 Split internal/rpc/server.go into 8 focused modules (bd-215)
Refactored monolithic 2238-line server.go into 8 files with clear responsibilities:
- server_core.go: Server type, NewServer (115 lines)
- server_lifecycle_conn.go: Start/Stop/connection handling (248 lines)
- server_cache_storage.go: Storage caching and eviction (286 lines)
- server_routing_validation_diagnostics.go: Request routing/validation (384 lines)
- server_issues_epics.go: Issue CRUD operations (506 lines)
- server_labels_deps_comments.go: Labels/deps/comments (199 lines)
- server_compact.go: Compaction operations (287 lines)
- server_export_import_auto.go: Export/import operations (293 lines)

Improvements:
- Replaced RWMutex.TryLock with atomic.Bool for portable single-flight guard
- Added default storage close in Stop() to prevent FD leaks
- All methods remain on *Server receiver (no behavior changes)
- Each file <510 LOC for better maintainability
- All tests pass, daemon verified working

Amp-Thread-ID: https://ampcode.com/threads/T-92d481ad-1bda-4ecd-bcf5-874a1889db30
Co-authored-by: Amp <amp@ampcode.com>
2025-10-27 21:14:34 -07:00

12 lines
729 B
Go

package rpc
// This file has been refactored into multiple files for better organization:
// - server_core.go: Server struct definition and NewServer constructor
// - server_lifecycle_conn.go: Server lifecycle (Start, Stop, WaitReady) and connection handling
// - server_cache_storage.go: Storage caching, eviction, and memory pressure management
// - server_routing_validation_diagnostics.go: Request routing, validation, and diagnostics
// - server_issues_epics.go: Issue CRUD operations and epic status handling
// - server_labels_deps_comments.go: Labels, dependencies, and comments operations
// - server_compact.go: Issue compaction operations
// - server_export_import_auto.go: Export, import, and auto-import operations