stats

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: GPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type ContainerStats

type ContainerStats struct {
	Name             string  `json:"name"`
	ServiceName      string  `json:"service_name"`
	CPUPercent       float64 `json:"cpu_percent"`
	CPUUserTime      uint64  `json:"cpu_user_time"`
	CPUSystemTime    uint64  `json:"cpu_system_time"`
	MemoryUsage      uint64  `json:"memory_usage"`
	MemoryLimit      uint64  `json:"memory_limit"`
	MemoryPercent    float64 `json:"memory_percent"`
	MemoryRSS        uint64  `json:"memory_rss"`
	MemoryCache      uint64  `json:"memory_cache"`
	MemorySwap       uint64  `json:"memory_swap"`
	PageFaults       uint64  `json:"page_faults"`
	PageMajorFaults  uint64  `json:"page_major_faults"`
	NetworkRxBytes   uint64  `json:"network_rx_bytes"`
	NetworkTxBytes   uint64  `json:"network_tx_bytes"`
	NetworkRxPackets uint64  `json:"network_rx_packets"`
	NetworkTxPackets uint64  `json:"network_tx_packets"`
	BlockReadBytes   uint64  `json:"block_read_bytes"`
	BlockWriteBytes  uint64  `json:"block_write_bytes"`
	BlockReadOps     uint64  `json:"block_read_ops"`
	BlockWriteOps    uint64  `json:"block_write_ops"`
}

type Handler

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

func NewHandler

func NewHandler(statsService *Service) *Handler

func (*Handler) GetStackStats

func (h *Handler) GetStackStats(c echo.Context) error

type Service

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

func NewService

func NewService(cfg *config.Config, dockerClient *docker.Client, stackService *stack.Service, logger *logging.Logger) *Service

func (*Service) GetStackStats

func (s *Service) GetStackStats(name string) (*StackStats, error)

type StackStats

type StackStats struct {
	StackName  string           `json:"stack_name"`
	Containers []ContainerStats `json:"containers"`
}

Jump to

Keyboard shortcuts

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