Documentation
¶
Overview ¶
Package daemon implements The Forge's background daemon process.
The daemon runs the main orchestration loop:
- Polls anvils for ready beads (via poller)
- Spawns Smith workers (via worker pool)
- Monitors PRs (via Bellows)
- Writes a PID file for lifecycle management
- Logs to ~/.forge/logs/daemon.log
Index ¶
Constants ¶
View Source
const ( // PIDFileName is the name of the PID file within ~/.forge/. PIDFileName = "forge.pid" // LogDir is the directory for daemon logs within ~/.forge/. LogDir = "logs" // LogFileName is the daemon log filename. LogFileName = "daemon.log" // DefaultPollInterval is the default interval between bead polls. DefaultPollInterval = 30 * time.Second // GracefulTimeout is how long to wait for workers to finish on shutdown. GracefulTimeout = 60 * time.Second // MaxDispatchFailures is the number of consecutive dispatch failures before // a bead is circuit-broken (marked needs_human). This prevents a single // poison bead from consuming capacity every poll cycle. MaxDispatchFailures = 3 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Daemon ¶
type Daemon struct {
// contains filtered or unexported fields
}
Daemon is the main Forge orchestration daemon.
func (*Daemon) BroadcastEvent ¶
BroadcastEvent sends an event to all connected IPC clients.
Click to show internal directories.
Click to hide internal directories.