dockercompose

package
v0.0.0-...-768cf9d Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeDown

func ComposeDown(caseHome string) error

ComposeDown stops and removes containers for the given case compose file.

func ComposeProjectName

func ComposeProjectName(caseHome string) string

ComposeProjectName returns the hashed docker-compose project name for a test case directory.

func CopyCoreLogs

func CopyCoreLogs()

func CreateDockerClient

func CreateDockerClient(opt ...docker.Opt) (client *docker.Client, err error)

func ForceShutDown

func ForceShutDown() error

ForceShutDown is an alias for ShutDown; always tears down compose and removes orphans.

func GetPhysicalAddress

func GetPhysicalAddress(virtual string) string

func Load

func Load(bootType BootType) error

Load configuration to the Booter.

func RemoveLeftoverE2EContainers

func RemoveLeftoverE2EContainers() error

RemoveLeftoverE2EContainers force-removes E2E containers for the current or given case project.

func ShutDown

func ShutDown() error

ShutDown stops compose and removes any leftover E2E containers (even if Start failed).

func Start

func Start(ctx context.Context) error

Start initialize the virtual environment and execute setup commands on the host machine.

func TryCopyCoreLogs

func TryCopyCoreLogs()

TryCopyCoreLogs exports loongcollector logs to test/e2e/report/<case>_log/ for debugging.

Types

type BootType

type BootType = string
const (
	DockerComposeBootTypeE2E       BootType = "e2e"
	DockerComposeBootTypeBenchmark BootType = "benchmark"
)

type Booter

type Booter interface {
	Start(ctx context.Context) error
	Stop() error
	CopyCoreLogs()
}

Booter start or stop the virtual environment.

type ComposeBenchmarkBooter

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

ComposeBooter control docker-compose to start or stop containers.

func NewComposeBenchmarkBooter

func NewComposeBenchmarkBooter() *ComposeBenchmarkBooter

NewComposeBooter create a new compose booter.

func (*ComposeBenchmarkBooter) CopyCoreLogs

func (c *ComposeBenchmarkBooter) CopyCoreLogs()

func (*ComposeBenchmarkBooter) Start

func (*ComposeBenchmarkBooter) Stop

func (c *ComposeBenchmarkBooter) Stop() error

type ComposeBooter

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

ComposeBooter control docker-compose to start or stop containers.

func NewComposeBooter

func NewComposeBooter() *ComposeBooter

NewComposeBooter create a new compose booter.

func (*ComposeBooter) CopyCoreLogs

func (c *ComposeBooter) CopyCoreLogs()

func (*ComposeBooter) Start

func (c *ComposeBooter) Start(ctx context.Context) (err error)

func (*ComposeBooter) Stop

func (c *ComposeBooter) Stop() error

type StrategyWrapper

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

StrategyWrapper caches the real wait.StrategyTarget to get the metadata of the running containers.

func (*StrategyWrapper) WaitUntilReady

func (s *StrategyWrapper) WaitUntilReady(ctx context.Context, target wait.StrategyTarget) error

Jump to

Keyboard shortcuts

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