docker

package
v0.0.0-...-191fbf7 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlkioStats

type BlkioStats struct {
	IoServiceBytesRecursive []IoServiceBytes `json:"io_service_bytes_recursive"`
}

type CPUStats

type CPUStats struct {
	CPUUsage       CPUUsage       `json:"cpu_usage"`
	SystemCPUUsage int64          `json:"system_cpu_usage"`
	OnlineCpus     int            `json:"online_cpus"`
	ThrottlingData ThrottlingData `json:"throttling_data"`
}

type CPUUsage

type CPUUsage struct {
	PercpuUsage       []int `json:"percpu_usage"`
	UsageInUsermode   int   `json:"usage_in_usermode"`
	TotalUsage        int   `json:"total_usage"`
	UsageInKernelmode int   `json:"usage_in_kernelmode"`
}

type Compose

type Compose struct {
	Version  string             `yaml:"version"`
	Services map[string]Service `yaml:"services"`
	Networks map[string]Network `yaml:"networks"`
}

type ComposeData

type ComposeData struct {
	Stack      string
	Containers map[string]*ContainerInfo
}

type ComposeService

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

func NewComposeService

func NewComposeService(composePath string) (ComposeService, error)

func (ComposeService) ComposeDown

func (service ComposeService) ComposeDown() error

func (ComposeService) ComposeUp

func (service ComposeService) ComposeUp() error

func (ComposeService) FilePath

func (service ComposeService) FilePath() string

func (ComposeService) Stack

func (service ComposeService) Stack() string

type ContainerCreateMsg

type ContainerCreateMsg struct {
	ID string
}

func (ContainerCreateMsg) Type

type ContainerInfo

type ContainerInfo struct {
	InspectData   types.ContainerJSON
	StatsSnapshot ContainerStats
	Processes     []Process
}

type ContainerMessageType

type ContainerMessageType string
const (
	Update ContainerMessageType = "update"
	Add    ContainerMessageType = "add"
	Remove ContainerMessageType = "remove"
)

type ContainerMsg

type ContainerMsg interface {
	Type() ContainerMessageType
}

type ContainerRemoveMsg

type ContainerRemoveMsg struct {
	ID string
}

func (ContainerRemoveMsg) Type

type ContainerStats

type ContainerStats struct {
	Read        time.Time   `json:"read"`
	PidsStats   PidsStats   `json:"pids_stats"`
	Networks    Networks    `json:"networks"`
	MemoryStats MemoryStats `json:"memory_stats"`
	BlkioStats  BlkioStats  `json:"blkio_stats"`
	CPUStats    CPUStats    `json:"cpu_stats"`
	PrecpuStats CPUStats    `json:"precpu_stats"`
}

type ContainerUpdateMsg

type ContainerUpdateMsg struct {
	ID        string
	Stats     ContainerStats
	Inspect   types.ContainerJSON
	Processes []Process
}

func (ContainerUpdateMsg) Type

type ContainersService

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

func NewContainersService

func NewContainersService(ctx context.Context, stack string) (ContainersService, error)

func (ContainersService) Close

func (service ContainersService) Close() error

func (ContainersService) ContainerPause

func (service ContainersService) ContainerPause(id string) error

func (ContainersService) ContainerStart

func (service ContainersService) ContainerStart(id string) error

func (ContainersService) ContainerStop

func (service ContainersService) ContainerStop(id string) error

func (ContainersService) ContainerUnpause

func (service ContainersService) ContainerUnpause(id string) error

func (ContainersService) GetContainerLogs

func (service ContainersService) GetContainerLogs(ctx context.Context, id, tail string) (stdout, stderr chan []byte, e chan error)

func (*ContainersService) GetContainerUpdates

func (service *ContainersService) GetContainerUpdates() (chan ContainerMsg, error)

func (ContainersService) Stack

func (service ContainersService) Stack() string

type Deploy

type Deploy struct {
	Mode     string `yaml:"mode"`
	Replicas int    `yaml:"replicas"`
}

type Eth0

type Eth0 struct {
	RxBytes   int `json:"rx_bytes"`
	RxDropped int `json:"rx_dropped"`
	RxErrors  int `json:"rx_errors"`
	RxPackets int `json:"rx_packets"`
	TxBytes   int `json:"tx_bytes"`
	TxDropped int `json:"tx_dropped"`
	TxErrors  int `json:"tx_errors"`
	TxPackets int `json:"tx_packets"`
}

type Eth5

type Eth5 struct {
	RxBytes   int `json:"rx_bytes"`
	RxDropped int `json:"rx_dropped"`
	RxErrors  int `json:"rx_errors"`
	RxPackets int `json:"rx_packets"`
	TxBytes   int `json:"tx_bytes"`
	TxDropped int `json:"tx_dropped"`
	TxErrors  int `json:"tx_errors"`
	TxPackets int `json:"tx_packets"`
}

type IoServiceBytes

type IoServiceBytes struct {
	Major     int    `json:"major"`
	Minor     int    `json:"minor"`
	Operation string `json:"op"`
	Value     int    `json:"value"`
}

type MemoryStats

type MemoryStats struct {
	Stats    Stats `json:"stats"`
	MaxUsage int   `json:"max_usage"`
	Usage    int   `json:"usage"`
	Failcnt  int   `json:"failcnt"`
	Limit    int   `json:"limit"`
}

type Network

type Network struct {
	Driver        string            `yaml:"driver"`
	DriverOptions map[string]string `yaml:"driver_opts"`
	Attachable    bool              `yaml:"attachable"`
	EnableIpv6    bool              `yaml:"enable_ipv6"`
	External      bool              `yaml:"external"`
	Internal      bool              `yaml:"internal"`
	Labels        map[string]string `yaml:"labels"`
	Name          string            `yaml:"name"`
}

type Networks

type Networks struct {
	Eth0 Eth0 `json:"eth0"`
	Eth5 Eth5 `json:"eth5"`
}

type PidsStats

type PidsStats struct {
	Current int `json:"current"`
}

type Process

type Process struct {
	PID     string
	PPID    string
	Threads string
	RSS     string
	CPU     string
	CMD     string
}

type Service

type Service struct {
	Name   string `yaml:"container_name"`
	Image  string `yaml:"image"`
	Deploy Deploy `yaml:"deploy"`
}

type Stats

type Stats struct {
	TotalPgmajfault         int `json:"total_pgmajfault"`
	Cache                   int `json:"cache"`
	MappedFile              int `json:"mapped_file"`
	TotalInactiveFile       int `json:"total_inactive_file"`
	Pgpgout                 int `json:"pgpgout"`
	Rss                     int `json:"rss"`
	TotalMappedFile         int `json:"total_mapped_file"`
	Writeback               int `json:"writeback"`
	Unevictable             int `json:"unevictable"`
	Pgpgin                  int `json:"pgpgin"`
	TotalUnevictable        int `json:"total_unevictable"`
	Pgmajfault              int `json:"pgmajfault"`
	TotalRss                int `json:"total_rss"`
	TotalRssHuge            int `json:"total_rss_huge"`
	TotalWriteback          int `json:"total_writeback"`
	TotalInactiveAnon       int `json:"total_inactive_anon"`
	RssHuge                 int `json:"rss_huge"`
	HierarchicalMemoryLimit int `json:"hierarchical_memory_limit"`
	TotalPgfault            int `json:"total_pgfault"`
	TotalActiveFile         int `json:"total_active_file"`
	ActiveAnon              int `json:"active_anon"`
	TotalActiveAnon         int `json:"total_active_anon"`
	TotalPgpgout            int `json:"total_pgpgout"`
	TotalCache              int `json:"total_cache"`
	InactiveAnon            int `json:"inactive_anon"`
	ActiveFile              int `json:"active_file"`
	Pgfault                 int `json:"pgfault"`
	InactiveFile            int `json:"inactive_file"`
	TotalPgpgin             int `json:"total_pgpgin"`
}

type ThrottlingData

type ThrottlingData struct {
	Periods          int `json:"periods"`
	ThrottledPeriods int `json:"throttled_periods"`
	ThrottledTime    int `json:"throttled_time"`
}

Jump to

Keyboard shortcuts

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