docker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DataDir string
}

type Docker

type Docker struct {
	DataDir     string
	HistoryFile string
}

func New

func New() (*Docker, error)

func NewWithConfig

func NewWithConfig(cfg Config) (*Docker, error)

func (*Docker) Run

func (d *Docker) Run(opts Options) (*Result, error)

type Error

type Error string
const (
	NoError        Error = ""
	ErrClose       Error = "ErrClose"
	ErrCollectLogs Error = "ErrCollectLogs"
	ErrOpenFile    Error = "ErrOpenFile"
	ErrScanner     Error = "ErrScanner"
	ErrWriteString Error = "ErrWriteString"
)

type Log

type Log struct {
	Log    string
	Stream string
}

type Options

type Options struct {
	RunID          string
	Image          string
	Shell          string
	Command        string
	Env            []string
	PidsLimit      int
	TimeoutSeconds int
	OutputLimit    int
	Binds          []string
	WorkingDir     string
}

type Result

type Result struct {
	ExitCode           int
	Logs               []Log
	OutputLimitReached bool
}

Jump to

Keyboard shortcuts

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