gotpc

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidImageBuidler     = errors.New("invalid image builder")
	ErrInvalidContainerManager = errors.New("invalid container manager")
)

Functions

This section is empty.

Types

type Case

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

func NewCase

func NewCase(imgBuilder ImageBuilder, contManager ContainerManager, netID string) (*Case, error)

func (*Case) Exec

func (c *Case) Exec(ctx context.Context) error

func (*Case) WithImageRebuild

func (c *Case) WithImageRebuild() *Case

type ContainerManager

type ContainerManager interface {
	CreateAndStart(ctx context.Context, css entities.ContainerStartSettings) (string, error)
	ShellCommand(ctx context.Context, containerName string, username string, workDir string, command []string) error
	RemoveContainer(ctx context.Context, name string) error
}

type ImageBuilder

type ImageBuilder interface {
	BuildImage(ctx context.Context, dockerfile string, tag string) error
}

Jump to

Keyboard shortcuts

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