docker

package
v0.0.0-...-7b198c0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func BackupContainer

func BackupContainer(containerID, outputPath string) (string, error)

func CreateContainer

func CreateContainer(imageName, dbType, containerName string, externalPort int, password string, envVars ...string) (string, error)

func DeleteContainer

func DeleteContainer(containerId string, deleteVolume bool) error

func DockerClient

func DockerClient() (*client.Client, error)

func InspectContainer

func InspectContainer(containerId string) (types.ContainerJSON, error)

func PullImage

func PullImage(imageName string) error

func ShellConnect

func ShellConnect(containerID string) error

func StreamLogs

func StreamLogs(containerId string)

Types

type ContainerStats

type ContainerStats struct {
	CPUPercentage float64
	MemoryUsage   uint64
	MemoryLimit   uint64
	StorageUsage  uint64
	StorageLimit  uint64
}

func GetContainerStats

func GetContainerStats(containerId string) (*ContainerStats, error)

Jump to

Keyboard shortcuts

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