system

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WSKindProjectLogs    = "project_logs"
	WSKindContainerLogs  = "container_logs"
	WSKindContainerStats = "container_stats"
	WSKindContainerExec  = "container_exec"
	WSKindSystemStats    = "system_stats"
)

WebSocket connection kind constants.

Variables

This section is empty.

Functions

This section is empty.

Types

type GPUStats

type GPUStats struct {
	// Name is the GPU model or identifier.
	//
	// Required: true
	Name string `json:"name"`
	// Index is the zero-based GPU index.
	//
	// Required: true
	Index int `json:"index"`
	// MemoryUsed is the GPU memory currently used, in bytes.
	//
	// Required: true
	MemoryUsed float64 `json:"memoryUsed"`
	// MemoryTotal is the total GPU memory available, in bytes.
	//
	// Required: true
	MemoryTotal float64 `json:"memoryTotal"`
}

GPUStats represents resource statistics for a single GPU.

type HealthResponse

type HealthResponse struct {
	// Status indicates the health status (e.g., "UP", "DOWN").
	//
	// Required: true
	Status string `json:"status"`
}

HealthResponse contains the health status of the API.

type PruneAllRequest

type PruneAllRequest struct {
	// Containers indicates if containers should be pruned.
	//
	// Required: true
	Containers bool `json:"containers"`

	// Images indicates if images should be pruned.
	//
	// Required: true
	Images bool `json:"images"`

	// Volumes indicates if volumes should be pruned.
	//
	// Required: true
	Volumes bool `json:"volumes"`

	// Networks indicates if networks should be pruned.
	//
	// Required: true
	Networks bool `json:"networks"`

	// BuildCache indicates if build cache should be pruned.
	//
	// Required: true
	BuildCache bool `json:"buildCache"`

	// Dangling indicates if only dangling resources should be pruned.
	//
	// Required: true
	Dangling bool `json:"dangling"`
}

PruneAllRequest is used to request pruning of Docker system resources.

type PruneAllResult

type PruneAllResult struct {
	// ContainersPruned is a list of container IDs that were pruned.
	//
	// Required: false
	ContainersPruned []string `json:"containersPruned,omitempty"`

	// ImagesDeleted is a list of image IDs that were deleted.
	//
	// Required: false
	ImagesDeleted []string `json:"imagesDeleted,omitempty"`

	// VolumesDeleted is a list of volume IDs that were deleted.
	//
	// Required: false
	VolumesDeleted []string `json:"volumesDeleted,omitempty"`

	// NetworksDeleted is a list of network IDs that were deleted.
	//
	// Required: false
	NetworksDeleted []string `json:"networksDeleted,omitempty"`

	// SpaceReclaimed is the amount of space reclaimed in bytes.
	//
	// Required: true
	SpaceReclaimed uint64 `json:"spaceReclaimed"`

	// ContainerSpaceReclaimed is the amount of space reclaimed from containers in bytes.
	//
	// Required: false
	ContainerSpaceReclaimed uint64 `json:"containerSpaceReclaimed,omitempty"`

	// ImageSpaceReclaimed is the amount of space reclaimed from images in bytes.
	//
	// Required: false
	ImageSpaceReclaimed uint64 `json:"imageSpaceReclaimed,omitempty"`

	// VolumeSpaceReclaimed is the amount of space reclaimed from volumes in bytes.
	//
	// Required: false
	VolumeSpaceReclaimed uint64 `json:"volumeSpaceReclaimed,omitempty"`

	// BuildCacheSpaceReclaimed is the amount of space reclaimed from build cache in bytes.
	//
	// Required: false
	BuildCacheSpaceReclaimed uint64 `json:"buildCacheSpaceReclaimed,omitempty"`

	// Success indicates if the prune operation was successful.
	//
	// Required: true
	Success bool `json:"success"`

	// Errors is a list of any errors encountered during the prune operation.
	//
	// Required: false
	Errors []string `json:"errors,omitempty"`
}

PruneAllResult is the result of a prune operation on Docker system resources.

type SystemStats

type SystemStats struct {
	// CPUUsage is the total CPU usage percentage.
	//
	// Required: true
	CPUUsage float64 `json:"cpuUsage"`
	// MemoryUsage is the used system memory, in bytes.
	//
	// Required: true
	MemoryUsage uint64 `json:"memoryUsage"`
	// MemoryTotal is the total system memory, in bytes.
	//
	// Required: true
	MemoryTotal uint64 `json:"memoryTotal"`
	// DiskUsage is the used disk space, in bytes.
	DiskUsage uint64 `json:"diskUsage,omitempty"`
	// DiskTotal is the total disk space, in bytes.
	DiskTotal uint64 `json:"diskTotal,omitempty"`
	// CPUCount is the number of CPUs available to the system.
	//
	// Required: true
	CPUCount int `json:"cpuCount"`
	// Architecture is the CPU architecture (e.g., amd64).
	//
	// Required: true
	Architecture string `json:"architecture"`
	// Platform is the operating system platform (e.g., linux).
	//
	// Required: true
	Platform string `json:"platform"`
	// Hostname is the system hostname.
	Hostname string `json:"hostname,omitempty"`
	// GPUCount is the number of GPUs detected.
	//
	// Required: true
	GPUCount int `json:"gpuCount"`
	// GPUs contains per-GPU resource statistics.
	GPUs []GPUStats `json:"gpus,omitempty"`
}

SystemStats represents system resource statistics for WebSocket streaming.

type WebSocketConnectionInfo

type WebSocketConnectionInfo struct {
	// ID is the unique identifier for the connection.
	//
	// Required: true
	ID string `json:"id"`
	// Kind is the type of WebSocket connection (e.g. project_logs, container_stats).
	//
	// Required: true
	Kind string `json:"kind"`
	// EnvID is the environment the connection belongs to.
	EnvID string `json:"envId,omitempty"`
	// ResourceID is the ID of the resource being streamed (container, project, etc.).
	ResourceID string `json:"resourceId,omitempty"`
	// ClientIP is the remote address of the client.
	ClientIP string `json:"clientIp,omitempty"`
	// UserID is the authenticated user who opened the connection.
	UserID string `json:"userId,omitempty"`
	// UserAgent is the HTTP User-Agent header from the client.
	UserAgent string `json:"userAgent,omitempty"`
	// StartedAt is when the connection was established.
	//
	// Required: true
	StartedAt time.Time `json:"startedAt"`
}

WebSocketConnectionInfo describes a single active WebSocket connection.

type WebSocketMetricsSnapshot

type WebSocketMetricsSnapshot struct {
	// ProjectLogsActive is the number of active project-log streams.
	ProjectLogsActive int64 `json:"projectLogsActive"`
	// ContainerLogsActive is the number of active container-log streams.
	ContainerLogsActive int64 `json:"containerLogsActive"`
	// ContainerStats is the number of active container-stats streams.
	ContainerStats int64 `json:"containerStats"`
	// ContainerExec is the number of active container-exec sessions.
	ContainerExec int64 `json:"containerExec"`
	// SystemStats is the number of active system-stats streams.
	SystemStats int64 `json:"systemStats"`
}

WebSocketMetricsSnapshot is a point-in-time copy of active WebSocket connection counts, broken down by kind.

Jump to

Keyboard shortcuts

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