peas

package
v0.0.0-...-cf22b21 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2018 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootfsPath = filepath.Join(os.TempDir(), "pea-empty-rootfs")

Functions

func NewPeaCleaner

func NewPeaCleaner(runcDeleter RuncDeleter, volumizer Volumizer, depotDir string) gardener.PeaCleaner

Types

type Pea

type Pea struct {
	Handle string
	Pid    int
}

type PeaCleaner

type PeaCleaner struct {
	RuncDeleter    RuncDeleter
	Volumizer      Volumizer
	Waiter         processwaiter.ProcessWaiter
	DepotDirectory string
}

func (*PeaCleaner) Clean

func (p *PeaCleaner) Clean(log lager.Logger, handle string) error

func (*PeaCleaner) CleanAll

func (p *PeaCleaner) CleanAll(log lager.Logger) error

type PeaCreator

type PeaCreator struct {
	Volumizer              Volumizer
	PidGetter              PidGetter
	PrivilegedGetter       PrivilegedGetter
	BindMountSourceCreator depot.BindMountSourceCreator
	BundleGenerator        depot.BundleGenerator
	BundleSaver            depot.BundleSaver
	ProcessBuilder         runrunc.ProcessBuilder
	ExecRunner             runrunc.ExecRunner
	RuncDeleter            RuncDeleter
	PeaCleaner             gardener.PeaCleaner
}

func (*PeaCreator) CreatePea

func (p *PeaCreator) CreatePea(log lager.Logger, processSpec garden.ProcessSpec, procIO garden.ProcessIO, sandboxHandle, sandboxBundlePath string) (garden.Process, error)

type PeaUsernameResolver

type PeaUsernameResolver struct {
	PidGetter    PidGetter
	PeaCreator   rundmc.PeaCreator
	Loader       rundmc.BundleLoader
	UserLookuper runrunc.UserLookupper
}

func (*PeaUsernameResolver) ResolveUser

func (r *PeaUsernameResolver) ResolveUser(log lager.Logger, bundlePath, handle string, image garden.ImageRef, username string) (int, int, error)

type PidGetter

type PidGetter interface {
	Pid(pidFilePath string) (int, error)
}

type PrivilegedGetter

type PrivilegedGetter interface {
	Privileged(bundlePath string) (bool, error)
}

type RuncDeleter

type RuncDeleter interface {
	Delete(log lager.Logger, force bool, handle string) error
}

type Volumizer

type Volumizer interface {
	Create(log lager.Logger, spec garden.ContainerSpec) (specs.Spec, error)
	Destroy(log lager.Logger, handle string) error
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.
processwaiterfakes
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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