runner

package
v0.0.0-...-42bfd3d Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 30 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CgroupsRootPath

func CgroupsRootPath(tag string) string

func MustMountTmpfs

func MustMountTmpfs(destination string)

func MustUnmountTmpfs

func MustUnmountTmpfs(destination string)

Types

type Binaries

type Binaries struct {
	Tar                   string `json:"tar,omitempty"`
	Gdn                   string `json:"gdn,omitempty"`
	Groot                 string `json:"groot,omitempty"`
	Tardis                string `json:"tardis,omitempty"`
	Init                  string `json:"init,omitempty"`
	RuntimePlugin         string `json:"runtime_plugin,omitempty"`
	ImagePlugin           string `json:"image_plugin,omitempty"`
	PrivilegedImagePlugin string `json:"privileged_image_plugin,omitempty"`
	NetworkPlugin         string `json:"network_plugin,omitempty"`
	NoopPlugin            string `json:"noop_plugin,omitempty"`
	ExecRunner            string `json:"execrunner,omitempty"`
	NSTar                 string `json:"nstar,omitempty"`
	Socket2me             string `json:"socket2me,omitempty"`
	FakeRunc              string `json:"fake_runc,omitempty"`
	FakeRuncStderr        string `json:"fake_runc_stderr,omitempty"`
}

type ErrGardenStop

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

type GardenRunner

type GardenRunner struct {
	*GdnRunnerConfig
	*ginkgomon.Runner
}

func NewGardenRunner

func NewGardenRunner(config GdnRunnerConfig) *GardenRunner

func (*GardenRunner) Setup

func (r *GardenRunner) Setup()

type GdnRunnerConfig

type GdnRunnerConfig struct {
	TmpDir         string
	User           UserCredential
	ConfigFilePath string

	Socket2meBin        string
	Socket2meSocketPath string
	RuncRoot            string

	// Garden config
	GdnBin                   string
	GrootBin                 string
	TarBin                   string `flag:"tar-bin"`
	InitBin                  string `flag:"init-bin"`
	RuntimePluginBin         string `flag:"runtime-plugin"`
	ImagePluginBin           string `flag:"image-plugin"`
	PrivilegedImagePluginBin string `flag:"privileged-image-plugin"`
	NetworkPluginBin         string `flag:"network-plugin"`
	ExecRunnerBin            string `flag:"dadoo-bin"`
	NSTarBin                 string `flag:"nstar-bin"`

	DefaultRootFS                  string   `flag:"default-rootfs"`
	DepotDir                       string   `flag:"depot"`
	ConsoleSocketsPath             string   `flag:"console-sockets-path"`
	BindIP                         string   `flag:"bind-ip"`
	BindPort                       *int     `flag:"bind-port"`
	BindSocket                     string   `flag:"bind-socket"`
	DenyNetworks                   []string `flag:"deny-network"`
	DefaultBlkioWeight             *uint64  `flag:"default-container-blockio-weight"`
	NetworkPluginExtraArgs         []string `flag:"network-plugin-extra-arg"`
	ImagePluginExtraArgs           []string `flag:"image-plugin-extra-arg"`
	RuntimePluginExtraArgs         []string `flag:"runtime-plugin-extra-arg"`
	PrivilegedImagePluginExtraArgs []string `flag:"privileged-image-plugin-extra-arg"`
	MaxContainers                  *uint64  `flag:"max-containers"`
	DebugIP                        string   `flag:"debug-bind-ip"`
	DebugPort                      *int     `flag:"debug-bind-port"`
	PropertiesPath                 string   `flag:"properties-path"`
	LogLevel                       string   `flag:"log-level"`
	TCPMemoryLimit                 *uint64  `flag:"tcp-memory-limit"`
	CPUQuotaPerShare               *uint64  `flag:"cpu-quota-per-share"`
	IPTablesBin                    string   `flag:"iptables-bin"`
	IPTablesRestoreBin             string   `flag:"iptables-restore-bin"`
	DNSServers                     []string `flag:"dns-server"`
	AdditionalDNSServers           []string `flag:"additional-dns-server"`
	AdditionalHostEntries          []string `flag:"additional-host-entry"`
	MTU                            *int     `flag:"mtu"`
	PortPoolSize                   *int     `flag:"port-pool-size"`
	PortPoolStart                  *int     `flag:"port-pool-start"`
	PortPoolPropertiesPath         string   `flag:"port-pool-properties-path"`
	DestroyContainersOnStartup     *bool    `flag:"destroy-containers-on-startup"`
	DockerRegistry                 string   `flag:"docker-registry"`
	InsecureDockerRegistry         string   `flag:"insecure-docker-registry"`
	AllowHostAccess                *bool    `flag:"allow-host-access"`
	SkipSetup                      *bool    `flag:"skip-setup"`
	UIDMapStart                    *uint32  `flag:"uid-map-start"`
	UIDMapLength                   *uint32  `flag:"uid-map-length"`
	GIDMapStart                    *uint32  `flag:"gid-map-start"`
	GIDMapLength                   *uint32  `flag:"gid-map-length"`
	CleanupProcessDirsOnWait       *bool    `flag:"cleanup-process-dirs-on-wait"`
	DisablePrivilegedContainers    *bool    `flag:"disable-privileged-containers"`
	AppArmor                       string   `flag:"apparmor"`
	Tag                            string   `flag:"tag"`
	NetworkPool                    string   `flag:"network-pool"`
	ContainerdSocket               string   `flag:"containerd-socket"`
	UseContainerdForProcesses      *bool    `flag:"use-containerd-for-processes"`
	CPUEntitlementPerShare         *float64 `flag:"cpu-entitlement-per-share"`
	EnableCPUThrottling            *bool    `flag:"enable-cpu-throttling"`
	CPUThrottlingCheckInterval     *uint64  `flag:"cpu-throttling-check-interval"`

	StartupExpectedToFail bool
	StorePath             string
	PrivilegedStorePath   string

	TCPKeepaliveTime     *int `flag:"tcp-keepalive-time"`
	TCPKeepaliveInterval *int `flag:"tcp-keepalive-interval"`
	TCPKeepaliveProbes   *int `flag:"tcp-keepalive-probes"`
	TCPRetries1          *int `flag:"tcp-retries1"`
	TCPRetries2          *int `flag:"tcp-retries2"`
}

func DefaultGdnRunnerConfig

func DefaultGdnRunnerConfig(binaries Binaries) GdnRunnerConfig

type RunningGarden

type RunningGarden struct {
	*GardenRunner
	client.Client

	Pid int
	// contains filtered or unexported fields
}

func Start

func Start(config GdnRunnerConfig) *RunningGarden

func (*RunningGarden) CgroupSubsystemPath

func (r *RunningGarden) CgroupSubsystemPath(subsystem, handle string) string

func (*RunningGarden) CgroupsRootPath

func (r *RunningGarden) CgroupsRootPath() string

func (*RunningGarden) Cleanup

func (r *RunningGarden) Cleanup() error

func (*RunningGarden) Create

func (*RunningGarden) DestroyAndStop

func (r *RunningGarden) DestroyAndStop() error

func (*RunningGarden) DestroyContainers

func (r *RunningGarden) DestroyContainers() error

func (*RunningGarden) GetContainerPid

func (r *RunningGarden) GetContainerPid(handle string) (string, error)

func (*RunningGarden) Kill

func (r *RunningGarden) Kill() error

func (*RunningGarden) NumGoroutines

func (r *RunningGarden) NumGoroutines() (int, error)

func (*RunningGarden) StackDump

func (r *RunningGarden) StackDump() (string, error)

func (*RunningGarden) Stop

func (r *RunningGarden) Stop() error

type UserCredential

type UserCredential *syscall.Credential

Jump to

Keyboard shortcuts

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