status

package
v0.55.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2026 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package status aggregates and formats system status information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker interface {
	GetStatus(ctx context.Context) (*Status, error)
	GetQueuedPrompts(ctx context.Context) ([]QueuedPrompt, error)
	GetCompletedPrompts(ctx context.Context, limit int) ([]CompletedPrompt, error)
}

Checker checks the current status of the dark-factory daemon.

func NewChecker

func NewChecker(
	queueDir string,
	completedDir string,
	ideasDir string,
	logDir string,
	lockFilePath string,
	serverPort int,
	promptMgr prompt.Manager,
) Checker

NewChecker creates a new Checker with additional options.

type CompletedPrompt

type CompletedPrompt struct {
	Name        string    `json:"name"`
	CompletedAt time.Time `json:"completed_at"`
}

CompletedPrompt represents a completed prompt with metadata.

type Formatter

type Formatter interface {
	Format(st *Status) string
}

Formatter formats status for display.

func NewFormatter

func NewFormatter() Formatter

NewFormatter creates a new Formatter.

type QueuedPrompt

type QueuedPrompt struct {
	Name  string `json:"name"`
	Title string `json:"title"`
	Size  int64  `json:"size"`
}

QueuedPrompt represents a prompt in the queue with metadata.

type Status

type Status struct {
	Daemon           string   `json:"daemon"`
	DaemonPID        int      `json:"daemon_pid,omitempty"`
	CurrentPrompt    string   `json:"current_prompt,omitempty"`
	ExecutingSince   string   `json:"executing_since,omitempty"`
	Container        string   `json:"container,omitempty"`
	ContainerRunning bool     `json:"container_running,omitempty"`
	QueueCount       int      `json:"queue_count"`
	QueuedPrompts    []string `json:"queued_prompts"`
	CompletedCount   int      `json:"completed_count"`
	IdeasCount       int      `json:"ideas_count"`
	LastLogFile      string   `json:"last_log_file,omitempty"`
	LastLogSize      int64    `json:"last_log_size,omitempty"`
}

Status represents the current daemon status.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL