cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2017 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RktStopIsAlreadyStoppedError

func RktStopIsAlreadyStoppedError(err error) bool

RktStopIsNotExistError determines if an error resulting from running `rkt stop` or `rkt app stop` is the result of the pod already being stopped

func RktStopIsNotExistError

func RktStopIsNotExistError(err error) bool

Types

type CLI

type CLI interface {
	With(CLIConfig) CLI
	RunCommand(string, ...string) ([]string, error)
	Command(string, ...string) []string
}

CLI is an interface for interacting with the rkt command line interface

func NewRktCLI

func NewRktCLI(rktPath string, exec utilexec.Interface, cfg CLIConfig) CLI

TODO(tmrts): implement CLI with timeout

type CLIConfig

type CLIConfig struct {
	Debug bool `flag:"debug"`

	Dir             string `flag:"dir"`
	LocalConfigDir  string `flag:"local-config"`
	UserConfigDir   string `flag:"user-config"`
	SystemConfigDir string `flag:"system-config"`

	InsecureOptions []string `flag:"insecure-options"`
}

func (*CLIConfig) Merge

func (cfg *CLIConfig) Merge(newCfg CLIConfig)

type Init

type Init interface {
	StartProcess(cgroupParent, command string, args ...string) (id string, err error)
}

Init is an interface for interacting with the init system on the host (e.g. systemd), to run rkt commands.

func NewSystemd

func NewSystemd(systemdRunPath string, execer utilexec.Interface) Init

NewSystemd creates an Init object with the path to `systemd-run`.

Directories

Path Synopsis
Code generated by Mockery for CLI.
Code generated by Mockery for CLI.

Jump to

Keyboard shortcuts

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