messymoby

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MessyMobyLabel = "messymoby"

MessyMobyLabel is the name of a “magic” label for tagging testing-related container or network elements.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup(ctx context.Context)

Cleanup removes dead test containers as well as duplicate networks.

func DockerCompose

func DockerCompose(ctx context.Context, args ...string)

DockerCompose executes docker-compose with the specified CLI arguments, waiting for it to gracefully finish with exit code 0.

func NewClient

func NewClient() *client.Client

NewClient returns a new Docker client connected to the default socket API location on the local host.

func RemoveDeadTestContainers

func RemoveDeadTestContainers(ctx context.Context, cln *client.Client, labelname string) error

RemoveDeadTestContainers removes dead or stopped containers. Optionally, removal can be limited to networks with a specific label name only.

func RemoveDuplicateTestNetworks

func RemoveDuplicateTestNetworks(ctx context.Context, cln *client.Client, labelname string) error

RemoveDuplicateTestNetworks removes duplicate networks, that is multiple networks with the same name, yet different IDs. Optionally, removal can be limited to networks with a specific label name only.

Types

This section is empty.

Jump to

Keyboard shortcuts

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