Documentation
¶
Index ¶
- Constants
- type ConvertDockerRunRequest
- type ConvertDockerRunResponse
- type DockerComposeConfig
- type DockerComposeDeploy
- type DockerComposeHealthcheck
- type DockerComposeResourceLimits
- type DockerComposeResources
- type DockerComposeService
- type DockerRunCommand
- type GPUStats
- type HealthResponse
- type PruneAllRequest
- type PruneAllResult
- type SystemStats
- type WebSocketConnectionInfo
- type WebSocketMetricsSnapshot
Constants ¶
View Source
const ( WSKindProjectLogs = "project_logs" WSKindContainerLogs = "container_logs" WSKindContainerStats = "container_stats" WSKindContainerExec = "container_exec" WSKindSystemStats = "system_stats" WSKindServiceLogs = "service_logs" )
WebSocket connection kind constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConvertDockerRunRequest ¶ added in v1.17.0
type ConvertDockerRunRequest struct {
DockerRunCommand string `json:"dockerRunCommand" binding:"required"`
}
type ConvertDockerRunResponse ¶ added in v1.17.0
type DockerComposeConfig ¶ added in v1.17.0
type DockerComposeConfig struct {
Services map[string]DockerComposeService `yaml:"services" json:"services"`
}
type DockerComposeDeploy ¶ added in v1.17.0
type DockerComposeDeploy struct {
Resources *DockerComposeResources `yaml:"resources,omitempty" json:"resources,omitempty"`
}
type DockerComposeHealthcheck ¶ added in v1.17.0
type DockerComposeHealthcheck struct {
Test string `yaml:"test" json:"test"`
}
type DockerComposeResourceLimits ¶ added in v1.17.0
type DockerComposeResources ¶ added in v1.17.0
type DockerComposeResources struct {
Limits *DockerComposeResourceLimits `yaml:"limits,omitempty" json:"limits,omitempty"`
}
type DockerComposeService ¶ added in v1.17.0
type DockerComposeService struct {
Image string `yaml:"image" json:"image"`
ContainerName string `yaml:"container_name,omitempty" json:"container_name,omitempty"`
Ports []string `yaml:"ports,omitempty" json:"ports,omitempty"`
Volumes []string `yaml:"volumes,omitempty" json:"volumes,omitempty"`
Environment []string `yaml:"environment,omitempty" json:"environment,omitempty"`
Networks []string `yaml:"networks,omitempty" json:"networks,omitempty"`
Restart string `yaml:"restart,omitempty" json:"restart,omitempty"`
WorkingDir string `yaml:"working_dir,omitempty" json:"working_dir,omitempty"`
User string `yaml:"user,omitempty" json:"user,omitempty"`
Entrypoint string `yaml:"entrypoint,omitempty" json:"entrypoint,omitempty"`
Command string `yaml:"command,omitempty" json:"command,omitempty"`
StdinOpen bool `yaml:"stdin_open,omitempty" json:"stdin_open,omitempty"`
TTY bool `yaml:"tty,omitempty" json:"tty,omitempty"`
Privileged bool `yaml:"privileged,omitempty" json:"privileged,omitempty"`
Labels []string `yaml:"labels,omitempty" json:"labels,omitempty"`
Healthcheck *DockerComposeHealthcheck `yaml:"healthcheck,omitempty" json:"healthcheck,omitempty"`
Deploy *DockerComposeDeploy `yaml:"deploy,omitempty" json:"deploy,omitempty"`
}
type DockerRunCommand ¶ added in v1.17.0
type DockerRunCommand struct {
Image string `json:"image"`
Name string `json:"name,omitempty"`
Ports []string `json:"ports,omitempty"`
Volumes []string `json:"volumes,omitempty"`
Environment []string `json:"environment,omitempty"`
Networks []string `json:"networks,omitempty"`
Restart string `json:"restart,omitempty"`
Workdir string `json:"workdir,omitempty"`
User string `json:"user,omitempty"`
Entrypoint string `json:"entrypoint,omitempty"`
Command string `json:"command,omitempty"`
Detached bool `json:"detached,omitempty"`
Interactive bool `json:"interactive,omitempty"`
TTY bool `json:"tty,omitempty"`
Remove bool `json:"remove,omitempty"`
Privileged bool `json:"privileged,omitempty"`
Labels []string `json:"labels,omitempty"`
HealthCheck string `json:"healthCheck,omitempty"`
MemoryLimit string `json:"memoryLimit,omitempty"`
CPULimit string `json:"cpuLimit,omitempty"`
}
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"`
// ServiceLogsActive is the number of active swarm service-log streams.
ServiceLogsActive int64 `json:"serviceLogsActive"`
}
WebSocketMetricsSnapshot is a point-in-time copy of active WebSocket connection counts, broken down by kind.
Click to show internal directories.
Click to hide internal directories.