domain

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DaemonRequest

type DaemonRequest struct {
	Type      RequestType `json:"type"`
	ID        int         `json:"id,omitempty"`
	Alias     string      `json:"alias,omitempty"`
	Command   string      `json:"command,omitempty"`
	Input     string      `json:"input,omitempty"`
	Lines     int         `json:"lines,omitempty"`
	New       bool        `json:"new,omitempty"`
	Force     bool        `json:"force,omitempty"`
	Redacted  bool        `json:"redacted,omitempty"`
	TypeMode  bool        `json:"type_mode,omitempty"`
	TypeDelay int         `json:"type_delay,omitempty"` // milliseconds between characters
	NoEnter   bool        `json:"no_enter,omitempty"`
	Submit    bool        `json:"submit,omitempty"`
}

DaemonRequest is sent from client to daemon over the Unix socket.

type DaemonResponse

type DaemonResponse struct {
	Success   bool          `json:"success"`
	Error     string        `json:"error,omitempty"`
	ID        int           `json:"id,omitempty"`
	Processes []ProcessInfo `json:"processes,omitempty"`
	Output    string        `json:"output,omitempty"`
	Cleaned   int           `json:"cleaned,omitempty"`
}

DaemonResponse is sent from daemon to client over the Unix socket.

type LineSource

type LineSource string

LineSource identifies where a log line came from.

const (
	SourceStdout LineSource = "out"
	SourceStdin  LineSource = "in"
)

type LogEntry

type LogEntry struct {
	Source   LineSource `json:"source"`
	Text     string     `json:"text"`
	Redacted bool       `json:"redacted,omitempty"`
}

LogEntry is a single line in the process output buffer.

type ProcessInfo

type ProcessInfo struct {
	ID         int          `json:"id"`
	Alias      string       `json:"alias,omitempty"`
	Command    string       `json:"command"`
	State      ProcessState `json:"state"`
	PID        int          `json:"pid"`
	ExitCode   int          `json:"exit_code"`
	StartedAt  time.Time    `json:"started_at"`
	FinishedAt *time.Time   `json:"finished_at,omitempty"`
}

ProcessInfo holds metadata about a managed background process.

type ProcessState

type ProcessState string

ProcessState represents the current state of a managed process.

const (
	StateRunning ProcessState = "running"
	StateDone    ProcessState = "done"
	StateFailed  ProcessState = "failed"
)

type RequestType

type RequestType string

RequestType identifies the kind of daemon request.

const (
	ReqRun      RequestType = "run"
	ReqList     RequestType = "list"
	ReqLog      RequestType = "log"
	ReqSend     RequestType = "send"
	ReqAttach   RequestType = "attach"
	ReqKill     RequestType = "kill"
	ReqClean    RequestType = "clean"
	ReqShutdown RequestType = "shutdown"
	ReqSnapshot RequestType = "snapshot"
)

Jump to

Keyboard shortcuts

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