adapter

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IdentityMount added in v1.1.0

func IdentityMount(path string, opts ...MountOption) specs.Mount

IdentityMount provides a shorthand for Mount which has the same from and to.

func Mount added in v1.1.0

func Mount(from, to string, opts ...MountOption) specs.Mount

Mount creates a bind mount description with "to" as the destination and "from" as the source. Various MountOptions can be specified to modify the mount options. By default, the most restrictive set of mount options are used.

Types

type GlobFunc added in v1.1.0

type GlobFunc func(string) ([]string, error)

GlobFunc is a function which when given a file path pattern returns a list of paths or an error if the search failed.

type MountOption added in v1.1.0

type MountOption func(*mountOptions)

MountOption can be used to alter the mount options to Mount or IdentityMount.

func AllowExec added in v1.1.0

func AllowExec() MountOption

AllowExec allows binaries to be executed from a mount. It maps to the exec/noexec mount option.

func AllowWrites added in v1.1.0

func AllowWrites() MountOption

AllowWrites allows writes to a mount. It maps to the ro/rw mount option.

func WithRecursiveBind added in v1.1.0

func WithRecursiveBind() MountOption

WithRecursiveBind mounts other bind mounts in the source to the destination recursively. It maps to the bind/rbind mount option.

type MountShare added in v1.1.0

type MountShare func(string) error

type RuncAdapter

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

func NewRuncAdapter

func NewRuncAdapter(features sysfeat.Features, glob GlobFunc, mountSharer MountShare, locker VolumeLocker) *RuncAdapter

func (*RuncAdapter) BuildSpec

func (a *RuncAdapter) BuildSpec(
	logger lager.Logger,
	bpmCfg *config.BPMConfig,
	procCfg *config.ProcessConfig,
	user specs.User,
) (specs.Spec, error)

func (*RuncAdapter) CreateJobPrerequisites

func (a *RuncAdapter) CreateJobPrerequisites(
	bpmCfg *config.BPMConfig,
	procCfg *config.ProcessConfig,
	user specs.User,
) (*os.File, *os.File, error)

type VolumeLocker added in v1.1.0

type VolumeLocker interface {
	LockVolume(string) (hostlock.LockedLock, error)
}

Jump to

Keyboard shortcuts

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