status

package
v0.11.7 Latest Latest
Warning

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

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

Documentation

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,
	promptMgr prompt.Manager,
) Checker

NewChecker creates a new Checker.

func NewCheckerWithOptions added in v0.8.0

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

NewCheckerWithOptions 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 added in v0.8.0

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

Formatter formats status for display.

func NewFormatter added in v0.8.0

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