pdcs

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveScientificNotationFromFloat

func RemoveScientificNotationFromFloat(x float64) (float64, error)

RemoveScientificNotationFromFloat returns a float without any scientific notation if the number has any. golang does not handle conversion of float64s that have scientific notation in them and otherwise stinks. please replace this if you have a better implementation.

Types

type Container

type Container struct {
	ID      string
	PodID   string // if container is part of pod
	Name    string
	Image   string
	Created string
	Ports   string
	State   int
}

Container implements container's basic information and its state.

func Containers

func Containers() ([]Container, error)

Containers returns list of containers (Container)

type ContainerStat

type ContainerStat struct {
	ID          string
	Name        string
	PIDs        uint64
	CPU         float64
	MemUsage    uint64
	MemLimit    uint64
	MemPerc     float64
	NetInput    uint64
	NetOutput   uint64
	BlockInput  uint64
	BlockOutput uint64
}

ContainerStat implements container's stat.

func ContainersStats

func ContainersStats() ([]ContainerStat, error)

ContainersStats returns list of containers stats (ContainerStat).

type Image

type Image struct {
	ID         string
	Repository string
	Tag        string
	Created    string
	Size       int64
}

Image implements image's basic information

func Images

func Images() ([]Image, error)

Images returns list of images (Image)

type Network

type Network struct {
	Name    string
	Labels  string
	Version string
	Plugins string
}

Network implements network's basic information

func Networks

func Networks() ([]Network, error)

Networks returns list of networks (Network)

type Pod

type Pod struct {
	ID              string
	InfraID         string
	Name            string
	Created         string
	State           int
	NumOfContainers int
}

Pod implements pod's basic information

func Pods

func Pods() ([]Pod, error)

Pods returns list of pods (Pod)

type System

type System struct {
	Podman    string
	Runtime   string
	Conmon    string
	Buildah   string
	MemTotal  int64
	MemFree   int64
	SwapTotal int64
	SwapFree  int64
	CPUs      int
}

System implements podman system information

func SystemInfo

func SystemInfo() (System, error)

SystemInfo return system information (System).

type Volume

type Volume struct {
	Name       string
	Driver     string
	Created    string
	MountPoint string
}

Volume implements volume's basic information

func Volumes

func Volumes() ([]Volume, error)

Volumes returns list of volumes (Volume)

Jump to

Keyboard shortcuts

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