Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDaemonRunning ¶
IsDaemonRunning checks whether the daemon is reachable on the socket.
Types ¶
type HealthData ¶
type HealthData struct {
Status string `json:"status"` // "ok" or "disconnected"
}
HealthData is the health check response.
func QueryHealth ¶
func QueryHealth(sockPath string) (*HealthData, error)
QueryHealth checks daemon health via the Unix socket.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves the status API over a Unix domain socket.
type SessionInfo ¶
type SessionInfo struct {
SessionID string `json:"sessionID"`
State string `json:"state"` // "executing" or "idle"
TaskID string `json:"taskID"` // empty when idle
StartedAt *time.Time `json:"startedAt"` // when current task started; nil when idle
IdleSince *time.Time `json:"idleSince"` // when actor became idle; nil when executing
}
SessionInfo is a snapshot of one active session.
func QuerySessions ¶
func QuerySessions(sockPath string) ([]SessionInfo, error)
QuerySessions fetches the active session list via the Unix socket.
type StatusData ¶
type StatusData struct {
Version string `json:"version"`
Uptime string `json:"uptime"`
RelayConnected bool `json:"relayConnected"`
RelayURL string `json:"relayURL"`
MachineID string `json:"machineID"`
ActiveSessions int `json:"activeSessions"`
InFlightTasks int `json:"inFlightTasks"`
MaxConcurrentTasks int `json:"maxConcurrentTasks"`
WarmWorkersEnabled bool `json:"warmWorkersEnabled"`
WarmWorkerIdleTTL string `json:"warmWorkerIdleTTL"`
WarmWorkerIdleCap int `json:"warmWorkerIdleCap"`
ActiveWarmWorkers int `json:"activeWarmWorkers"`
IdleWarmWorkers int `json:"idleWarmWorkers"`
LogLevel string `json:"logLevel"`
}
StatusData is the full daemon status snapshot.
func QueryStatus ¶
func QueryStatus(sockPath string) (*StatusData, error)
QueryStatus fetches the full daemon status via the Unix socket.
type StatusProvider ¶
type StatusProvider interface {
Health() HealthData
Status() StatusData
Sessions() []SessionInfo
Workers() []WorkerInfo
}
StatusProvider is implemented by the daemon loop to expose live state.
type WorkerInfo ¶
type WorkerInfo struct {
SessionID string `json:"sessionID"`
Provider string `json:"provider"`
Model string `json:"model"`
PID int `json:"pid"`
KeyHash string `json:"keyHash"`
State string `json:"state"`
StartedAt time.Time `json:"startedAt"`
LastUsedAt time.Time `json:"lastUsedAt"`
IdleSince *time.Time `json:"idleSince"`
}
func QueryWorkers ¶
func QueryWorkers(sockPath string) ([]WorkerInfo, error)
QueryWorkers fetches warm provider worker snapshots via the Unix socket.
Click to show internal directories.
Click to hide internal directories.