Resolve import cycles and migrate to chorus.services module path
This comprehensive refactoring addresses critical architectural issues: IMPORT CYCLE RESOLUTION: • pkg/crypto ↔ pkg/slurp/roles: Created pkg/security/access_levels.go • pkg/ucxl → pkg/dht: Created pkg/storage/interfaces.go • pkg/slurp/leader → pkg/election → pkg/slurp/storage: Moved types to pkg/election/interfaces.go MODULE PATH MIGRATION: • Changed from github.com/anthonyrawlins/bzzz to chorus.services/bzzz • Updated all import statements across 115+ files • Maintains compatibility while removing personal GitHub account dependency TYPE SYSTEM IMPROVEMENTS: • Resolved duplicate type declarations in crypto package • Added missing type definitions (RoleStatus, TimeRestrictions, KeyStatus, KeyRotationResult) • Proper interface segregation to prevent future cycles ARCHITECTURAL BENEFITS: • Build now progresses past structural issues to normal dependency resolution • Cleaner separation of concerns between packages • Eliminates circular dependencies that prevented compilation • Establishes foundation for scalable codebase growth 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Bzzz P2P Service Installation Script
|
||||
# Installs Bzzz as a systemd service
|
||||
# BZZZ Service Installation Script
|
||||
# Installs BZZZ as a systemd service
|
||||
|
||||
set -e
|
||||
|
||||
echo "🐝 Installing Bzzz P2P Task Coordination Service..."
|
||||
echo "🐝 Installing BZZZ P2P Task Coordination Service..."
|
||||
|
||||
# Check if running as root or with sudo
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
@@ -14,20 +14,19 @@ if [ "$EUID" -ne 0 ]; then
|
||||
fi
|
||||
|
||||
# Define paths
|
||||
BZZZ_DIR="/home/tony/chorus/project-queues/active/BZZZ"
|
||||
BZZZ_DIR="$(pwd)"
|
||||
SERVICE_FILE="$BZZZ_DIR/bzzz.service"
|
||||
SYSTEMD_DIR="/etc/systemd/system"
|
||||
|
||||
# Check if Bzzz binary exists
|
||||
# Check if BZZZ binary exists
|
||||
if [ ! -f "$BZZZ_DIR/bzzz" ]; then
|
||||
echo "❌ Bzzz binary not found at $BZZZ_DIR/bzzz"
|
||||
echo " Please build the binary first with: go build -o bzzz"
|
||||
echo "❌ BZZZ binary not found at $BZZZ_DIR/bzzz"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make binary executable
|
||||
chmod +x "$BZZZ_DIR/bzzz"
|
||||
echo "✅ Made Bzzz binary executable"
|
||||
echo "✅ Made BZZZ binary executable"
|
||||
|
||||
# Copy service file to systemd directory
|
||||
cp "$SERVICE_FILE" "$SYSTEMD_DIR/bzzz.service"
|
||||
@@ -43,24 +42,11 @@ echo "✅ Reloaded systemd daemon"
|
||||
|
||||
# Enable service to start on boot
|
||||
systemctl enable bzzz.service
|
||||
echo "✅ Enabled Bzzz service for auto-start"
|
||||
echo "✅ Enabled BZZZ service for auto-start"
|
||||
|
||||
# Start the service
|
||||
systemctl start bzzz.service
|
||||
echo "✅ Started Bzzz service"
|
||||
|
||||
# Check service status
|
||||
echo ""
|
||||
echo "📊 Service Status:"
|
||||
systemctl status bzzz.service --no-pager -l
|
||||
echo "✅ Started BZZZ service"
|
||||
|
||||
echo ""
|
||||
echo "🎉 Bzzz P2P Task Coordination Service installed successfully!"
|
||||
echo ""
|
||||
echo "Commands:"
|
||||
echo " sudo systemctl start bzzz - Start the service"
|
||||
echo " sudo systemctl stop bzzz - Stop the service"
|
||||
echo " sudo systemctl restart bzzz - Restart the service"
|
||||
echo " sudo systemctl status bzzz - Check service status"
|
||||
echo " sudo journalctl -u bzzz -f - Follow service logs"
|
||||
echo " sudo systemctl disable bzzz - Disable auto-start"
|
||||
echo "🎉 BZZZ P2P Task Coordination Service installed successfully!"
|
||||
|
||||
Reference in New Issue
Block a user