container

package
v0.0.0-...-a5025f8 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewManager

func NewManager(config *models.Config, logger *log.Logger) eval.SandboxManager

Types

type Container

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

Container implements eval.Sandbox

func (*Container) Cleanup

func (c *Container) Cleanup() error

func (*Container) CreateDirectory

func (c *Container) CreateDirectory(path string, perm fs.FileMode) error

func (*Container) CreateFile

func (c *Container) CreateFile(path string, perm fs.FileMode) error

func (*Container) DeleteDirectory

func (c *Container) DeleteDirectory(path string) error

func (*Container) DeleteFile

func (c *Container) DeleteFile(path string) error

func (*Container) ExecuteCommand

func (c *Container) ExecuteCommand(ctx context.Context, command []string, config *eval.RunConfig) (*eval.RunStatus, error)

func (*Container) GetID

func (c *Container) GetID() int

func (*Container) GetPath

func (c *Container) GetPath(path string) string

func (*Container) ReadFile

func (c *Container) ReadFile(path string) ([]byte, error)

func (*Container) WriteToFile

func (c *Container) WriteToFile(path string, data []byte, perm fs.FileMode) error

type Manager

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

Manager implements eval.SandboxManager

func (*Manager) ReleaseSandbox

func (m *Manager) ReleaseSandbox(sandbox eval.Sandbox)

func (*Manager) RunTask

func (m *Manager) RunTask(ctx context.Context, task eval.Task) error

func (*Manager) Stop

func (m *Manager) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

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