Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func NewPeaCleaner

func NewPeaCleaner(deleter Deleter, volumizer Volumizer, runtime Runtime, peaPidGetter PeaPidGetter) gardener.PeaCleaner

Types

type BundleGenerator

type BundleGenerator interface {
	Generate(desiredContainerSpec spec.DesiredContainerSpec) (goci.Bndl, error)
}

type BundleLoader

type BundleLoader interface {
	Load(log lager.Logger, handle string) (goci.Bndl, error)
}

type Deleter

type Deleter interface {
	Delete(log lager.Logger, handle string) error
}

type ExecRunner

type ExecRunner interface {
	RunPea(
		log lager.Logger, processID string, bundle goci.Bndl, sandboxHandle string,
		pio garden.ProcessIO, tty bool, procJSON io.Reader, extraCleanup func() error,
	) (garden.Process, error)
}

type NetworkDepot

type NetworkDepot interface {
	SetupBindMounts(log lager.Logger, handle string, privileged bool, rootfsPath string) ([]garden.BindMount, error)
	Destroy(log lager.Logger, handle string) error
}

type PeaCleaner

type PeaCleaner struct {
	Deleter      Deleter
	Volumizer    Volumizer
	Waiter       processwaiter.ProcessWaiter
	Runtime      Runtime
	PeaPidGetter PeaPidGetter
}

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
	NetworkDepot     NetworkDepot
	BundleGenerator  BundleGenerator
	BundleSaver      depot.BundleSaver
	ProcessBuilder   runrunc.ProcessBuilder
	ExecRunner       ExecRunner
	PeaCleaner       gardener.PeaCleaner
}

func (*PeaCreator) CreatePea

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

type PeaPidGetter

type PeaPidGetter interface {
	GetPeaPid(logger lager.Logger, _, peaID string) (int, error)
}

type PeaUsernameResolver

type PeaUsernameResolver struct {
	PidGetter     ProcessPidGetter
	PeaCreator    rundmc.PeaCreator
	UserLookupper users.UserLookupper
	BundleLoader  BundleLoader
}

func (*PeaUsernameResolver) ResolveUser

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

type PidGetter

type PidGetter interface {
	GetPid(log lager.Logger, handle string) (int, error)
}

type PrivilegedGetter

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

type ProcessPidGetter

type ProcessPidGetter interface {
	GetPid(log lager.Logger, handle string) (int, error)
	GetPeaPid(log lager.Logger, handle, peaID string) (int, error)
}

type Runtime

type Runtime interface {
	ContainerHandles() ([]string, error)
	ContainerPeaHandles(log lager.Logger, id string) ([]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.
privcheckerfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
processwaiterfakes
Code generated by counterfeiter.
Code generated by counterfeiter.