server

package
v2026.909.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearState added in v2026.909.0

func ClearState() error

func ForceStop added in v2026.909.0

func ForceStop(state State)

ForceStop terminates the server and, when present, its separately managed Vite process group. Detached Solomon and Vite commands are process-group leaders, while a foreground "server run" may share its terminal's group; forceStopProcess handles both cases without killing an unrelated shell.

func ForceStopPID added in v2026.909.0

func ForceStopPID(pid int)

func LogPath added in v2026.909.0

func LogPath() (string, error)

func Run added in v2026.909.0

func Run(ctx context.Context, options Options) error

func SaveState added in v2026.909.0

func SaveState(state State) error

func StatePath added in v2026.909.0

func StatePath() (string, error)

Types

type Health added in v2026.909.0

type Health struct {
	OK      bool      `json:"ok"`
	Server  State     `json:"server"`
	Now     time.Time `json:"now"`
	Uptime  string    `json:"uptime"`
	API     string    `json:"api"`
	GUI     string    `json:"gui"`
	Workers string    `json:"workers"`
}

type Options

type Options struct {
	Mode       string
	DevDir     string
	ListenAddr string
}

type ReachableAddress added in v2026.909.0

type ReachableAddress struct {
	Kind      string `json:"kind"`
	Interface string `json:"interface,omitempty"`
	URL       string `json:"url"`
}

type State added in v2026.909.0

type State struct {
	PID       int                `json:"pid"`
	URL       string             `json:"url"`
	LocalURL  string             `json:"localhost_url"`
	Addresses []ReachableAddress `json:"addresses,omitempty"`
	StartedAt time.Time          `json:"started_at"`
	Version   string             `json:"version"`
	Mode      string             `json:"mode"`
	Vite      string             `json:"vite"`
	ViteURL   string             `json:"vite_url,omitempty"`
	VitePID   int                `json:"vite_pid,omitempty"`
	DevDir    string             `json:"dev_directory,omitempty"`
	GOOS      string             `json:"goos"`
	GoVersion string             `json:"go_version"`
}

func LoadState added in v2026.909.0

func LoadState() (State, error)

Jump to

Keyboard shortcuts

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