ui

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(ctx context.Context, addr string, mgr vm.Manager, version string) error

Types

type DashboardData

type DashboardData struct {
	VMs     []VMRow
	Total   int
	UIAddr  string
	Version string
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(mgr vm.Manager, uiAddr, version string) *Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type PortRow

type PortRow struct {
	HostPort  uint16 `json:"host_port"`
	GuestPort uint16 `json:"guest_port"`
	Protocol  string `json:"protocol"`
}

type VMDetailData

type VMDetailData struct {
	VM       VMDetailRow
	Logs     string
	UIAddr   string
	Version  string
	BackLink string
}

type VMDetailRow

type VMDetailRow struct {
	ID            string    `json:"id"`
	Name          string    `json:"name"`
	State         string    `json:"state"`
	Image         string    `json:"image"`
	Memory        string    `json:"memory"`
	CPUs          int       `json:"cpus"`
	Health        string    `json:"health"`
	RestartPolicy string    `json:"restart_policy"`
	RestartCount  int       `json:"restart_count"`
	CreatedAt     string    `json:"created_at"`
	StartedAt     string    `json:"started_at"`
	StoppedAt     string    `json:"stopped_at"`
	IPAddress     string    `json:"ip_address"`
	GatewayIP     string    `json:"gateway_ip"`
	Env           []string  `json:"env,omitempty"`
	Ports         []PortRow `json:"ports,omitempty"`
}

type VMRow

type VMRow struct {
	ID     string
	Name   string
	State  string
	Image  string
	Health string
}

Jump to

Keyboard shortcuts

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