pdcs

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDeadline = errors.New("deadline exceeded")

ErrDeadline deadline exceeded error.

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.

func SetupRegistry added in v1.2.0

func SetupRegistry()

SetupRegistry will initialize podman registry.

func StartCacheSizeTicker added in v1.10.0

func StartCacheSizeTicker(logger klog.Logger, duration int64)

StartCacheSizeTicker starts container cache refresh routine.

func StartEventStreamer added in v1.8.0

func StartEventStreamer(logger klog.Logger, updateImage bool)

Types

type Container

type Container struct {
	ID         string
	PodID      string // if container is part of pod
	PodName    string // if container is part of pod
	Name       string
	Labels     map[string]string
	Image      string
	Created    int64
	Started    int64
	Exited     int64
	ExitCode   int32
	Ports      string
	State      int
	Health     int
	RwSize     int64
	RootFsSize int64
}

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
	CPUSystem   float64
	MemUsage    uint64
	MemLimit    uint64
	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
	ParentID   string
	Repository string
	Tag        string
	Created    int64
	Size       int64
	Digest     string
	Labels     map[string]string
}

Image implements image's basic information.

func Images

func Images() ([]Image, error)

Images returns list of images (Image).

type ImageReport added in v1.8.0

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

type Network

type Network struct {
	Name             string
	ID               string
	Driver           string
	NetworkInterface string
	Labels           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
	Labels          map[string]string
	Created         int64
	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
}

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    int64
	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