WIP: Extract daemon runtime into internal/daemonrunner
- Created config.go with Config struct - Created daemon.go with Daemon struct and Start/Stop methods - Created logger.go for logging setup - Created process.go for lock/PID management - Created fingerprint.go for database validation - Created flock_unix.go/flock_windows.go for platform-specific locking - Created git.go for git operations Still TODO: - Implement runGlobalDaemon, startRPCServer, runSyncLoop - Create sync.go, rpc.go, jsonl.go, validation.go - Update cmd/bd/daemon.go to use daemonrunner Part of bd-5f26
This commit is contained in:
26
internal/daemonrunner/config.go
Normal file
26
internal/daemonrunner/config.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package daemonrunner
|
||||
|
||||
import "time"
|
||||
|
||||
// Config holds all configuration for the daemon
|
||||
type Config struct {
|
||||
// Sync behavior
|
||||
Interval time.Duration
|
||||
AutoCommit bool
|
||||
AutoPush bool
|
||||
|
||||
// Scope
|
||||
Global bool
|
||||
|
||||
// Paths
|
||||
LogFile string
|
||||
PIDFile string
|
||||
DBPath string // Local daemon only
|
||||
BeadsDir string // Local daemon: .beads dir, Global daemon: ~/.beads
|
||||
|
||||
// RPC
|
||||
SocketPath string
|
||||
|
||||
// Workspace
|
||||
WorkspacePath string // Only for local daemon: parent of .beads directory
|
||||
}
|
||||
Reference in New Issue
Block a user