cmd

package
v0.0.0-...-4bf4b70 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: Apache-2.0, MIT Imports: 47 Imported by: 0

Documentation

Overview

Package cmd holds implementations of the runsc commands.

Index

Constants

This section is empty.

Variables

View Source
var ErrorLogger io.Writer

ErrorLogger is where error messages should be written to. These messages are consumed by containerd and show up to users of command line tools, like docker/kubectl.

Functions

func Errorf

func Errorf(format string, args ...interface{}) subcommands.ExitStatus

Errorf logs error to containerd log (--log), to stderr, and debug logs. It returns subcommands.ExitFailure for convenience with subcommand.Execute() methods:

return Errorf("Danger! Danger!")

func Fatalf

func Fatalf(format string, args ...interface{})

Fatalf logs the same way as Errorf() does, plus *exits* the process.

Types

type ArchInfo

type ArchInfo struct {
	// Syscalls maps syscall number for the architecture to the doc.
	Syscalls map[uintptr]SyscallDoc `json:"syscalls"`
}

ArchInfo is compatibility doc for an architecture.

type Boot

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

Boot implements subcommands.Command for the "boot" command which starts a new sandbox. It should not be called directly.

func (*Boot) Execute

func (b *Boot) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute. It starts a sandbox in a waiting state.

func (*Boot) Name

func (*Boot) Name() string

Name implements subcommands.Command.Name.

func (*Boot) SetFlags

func (b *Boot) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Boot) Synopsis

func (*Boot) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Boot) Usage

func (*Boot) Usage() string

Usage implements subcommands.Command.Usage.

type Checkpoint

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

Checkpoint implements subcommands.Command for the "checkpoint" command.

func (*Checkpoint) Execute

func (c *Checkpoint) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Checkpoint) Name

func (*Checkpoint) Name() string

Name implements subcommands.Command.Name.

func (*Checkpoint) SetFlags

func (c *Checkpoint) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Checkpoint) Synopsis

func (*Checkpoint) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Checkpoint) Usage

func (*Checkpoint) Usage() string

Usage implements subcommands.Command.Usage.

type CompatibilityInfo

type CompatibilityInfo map[string]map[string]ArchInfo

CompatibilityInfo is a map of system and architecture to compatibility doc. Maps operating system to architecture to ArchInfo.

type Create

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

Create implements subcommands.Command for the "create" command.

func (*Create) Execute

func (c *Create) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Create) Name

func (*Create) Name() string

Name implements subcommands.Command.Name.

func (*Create) SetFlags

func (c *Create) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Create) Synopsis

func (*Create) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Create) Usage

func (*Create) Usage() string

Usage implements subcommands.Command.Usage.

type Debug

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

Debug implements subcommands.Command for the "debug" command.

func (*Debug) Execute

func (d *Debug) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Debug) Name

func (*Debug) Name() string

Name implements subcommands.Command.

func (*Debug) SetFlags

func (d *Debug) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.

func (*Debug) Synopsis

func (*Debug) Synopsis() string

Synopsis implements subcommands.Command.

func (*Debug) Usage

func (*Debug) Usage() string

Usage implements subcommands.Command.

type Delete

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

Delete implements subcommands.Command for the "delete" command.

func (*Delete) Execute

func (d *Delete) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Delete) Name

func (*Delete) Name() string

Name implements subcommands.Command.Name.

func (*Delete) SetFlags

func (d *Delete) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Delete) Synopsis

func (*Delete) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Delete) Usage

func (*Delete) Usage() string

Usage implements subcommands.Command.Usage.

type Do

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

Do implements subcommands.Command for the "do" command. It sets up a simple sandbox and executes the command inside it. See Usage() for more details.

func (*Do) Execute

func (c *Do) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Do) Name

func (*Do) Name() string

Name implements subcommands.Command.Name.

func (*Do) SetFlags

func (c *Do) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Do) Synopsis

func (*Do) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Do) Usage

func (*Do) Usage() string

Usage implements subcommands.Command.Usage.

type Events

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

Events implements subcommands.Command for the "events" command.

func (*Events) Execute

func (evs *Events) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Events) Name

func (*Events) Name() string

Name implements subcommands.Command.Name.

func (*Events) SetFlags

func (evs *Events) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Events) Synopsis

func (*Events) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Events) Usage

func (*Events) Usage() string

Usage implements subcommands.Command.Usage.

type Exec

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

Exec implements subcommands.Command for the "exec" command.

func (*Exec) Execute

func (ex *Exec) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute. It starts a process in an already created container.

func (*Exec) Name

func (*Exec) Name() string

Name implements subcommands.Command.Name.

func (*Exec) SetFlags

func (ex *Exec) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Exec) Synopsis

func (*Exec) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Exec) Usage

func (*Exec) Usage() string

Usage implements subcommands.Command.Usage.

type Gofer

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

Gofer implements subcommands.Command for the "gofer" command, which starts a filesystem gofer. This command should not be called directly.

func (*Gofer) Execute

func (g *Gofer) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.

func (*Gofer) Name

func (*Gofer) Name() string

Name implements subcommands.Command.

func (*Gofer) SetFlags

func (g *Gofer) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.

func (*Gofer) Synopsis

func (*Gofer) Synopsis() string

Synopsis implements subcommands.Command.

func (*Gofer) Usage

func (*Gofer) Usage() string

Usage implements subcommands.Command.

type Help

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

Help implements subcommands.Command for the "help" command. The 'help' command prints help for commands registered to a Commander but also allows for registering additional help commands that print other documentation.

func NewHelp

func NewHelp(cdr *subcommands.Commander) *Help

NewHelp returns a help command for the given commander.

func (*Help) Execute

func (h *Help) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Help) Name

func (*Help) Name() string

Name implements subcommands.Command.Name.

func (*Help) Register

func (h *Help) Register(cmd subcommands.Command)

Register registers a new help command.

func (*Help) SetFlags

func (h *Help) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Help) Synopsis

func (*Help) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Help) Usage

func (*Help) Usage() string

Usage implements subcommands.Command.Usage.

type Install

type Install struct {
	ConfigFile   string
	Runtime      string
	Experimental bool
}

Install implements subcommands.Command.

func (*Install) Execute

func (i *Install) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Install) Name

func (*Install) Name() string

Name implements subcommands.Command.Name.

func (*Install) SetFlags

func (i *Install) SetFlags(fs *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Install) Synopsis

func (*Install) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Install) Usage

func (*Install) Usage() string

Usage implements subcommands.Command.Usage.

type Kill

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

Kill implements subcommands.Command for the "kill" command.

func (*Kill) Execute

func (k *Kill) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Kill) Name

func (*Kill) Name() string

Name implements subcommands.Command.Name.

func (*Kill) SetFlags

func (k *Kill) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Kill) Synopsis

func (*Kill) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Kill) Usage

func (*Kill) Usage() string

Usage implements subcommands.Command.Usage.

type List

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

List implements subcommands.Command for the "list" command for the "list" command.

func (*List) Execute

func (l *List) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*List) Name

func (*List) Name() string

Name implements subcommands.command.name.

func (*List) SetFlags

func (l *List) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*List) Synopsis

func (*List) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*List) Usage

func (*List) Usage() string

Usage implements subcommands.Command.Usage.

type PS

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

PS implements subcommands.Command for the "ps" command.

func (*PS) Execute

func (ps *PS) Execute(ctx context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*PS) Name

func (*PS) Name() string

Name implements subcommands.Command.Name.

func (*PS) SetFlags

func (ps *PS) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*PS) Synopsis

func (*PS) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*PS) Usage

func (*PS) Usage() string

Usage implements subcommands.Command.Usage.

type Pause

type Pause struct{}

Pause implements subcommands.Command for the "pause" command.

func (*Pause) Execute

func (*Pause) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Pause) Name

func (*Pause) Name() string

Name implements subcommands.Command.Name.

func (*Pause) SetFlags

func (*Pause) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Pause) Synopsis

func (*Pause) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Pause) Usage

func (*Pause) Usage() string

Usage implements subcommands.Command.Usage.

type Restore

type Restore struct {
	// Restore flags are a super-set of those for Create.
	Create
	// contains filtered or unexported fields
}

Restore implements subcommands.Command for the "restore" command.

func (*Restore) Execute

func (r *Restore) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Restore) Name

func (*Restore) Name() string

Name implements subcommands.Command.Name.

func (*Restore) SetFlags

func (r *Restore) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Restore) Synopsis

func (*Restore) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Restore) Usage

func (*Restore) Usage() string

Usage implements subcommands.Command.Usage.

type Resume

type Resume struct{}

Resume implements subcommands.Command for the "resume" command.

func (*Resume) Execute

func (r *Resume) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Resume) Name

func (*Resume) Name() string

Name implements subcommands.Command.Name.

func (*Resume) SetFlags

func (r *Resume) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Resume) Synopsis

func (*Resume) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Resume) Usage

func (*Resume) Usage() string

Usage implements subcommands.Command.Usage.

type Run

type Run struct {
	// Run flags are a super-set of those for Create.
	Create
	// contains filtered or unexported fields
}

Run implements subcommands.Command for the "run" command.

func (*Run) Execute

func (r *Run) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Run) Name

func (*Run) Name() string

Name implements subcommands.Command.Name.

func (*Run) SetFlags

func (r *Run) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Run) Synopsis

func (*Run) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Run) Usage

func (*Run) Usage() string

Usage implements subcommands.Command.Usage.

type Spec

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

Spec implements subcommands.Command for the "spec" command.

func (*Spec) Execute

func (s *Spec) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Spec) Name

func (*Spec) Name() string

Name implements subcommands.Command.Name.

func (*Spec) SetFlags

func (s *Spec) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Spec) Synopsis

func (*Spec) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Spec) Usage

func (*Spec) Usage() string

Usage implements subcommands.Command.Usage.

type Start

type Start struct{}

Start implements subcommands.Command for the "start" command.

func (*Start) Execute

func (*Start) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Start) Name

func (*Start) Name() string

Name implements subcommands.Command.Name.

func (*Start) SetFlags

func (*Start) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Start) Synopsis

func (*Start) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Start) Usage

func (*Start) Usage() string

Usage implements subcommands.Command.Usage.

type State

type State struct{}

State implements subcommands.Command for the "state" command.

func (*State) Execute

func (*State) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*State) Name

func (*State) Name() string

Name implements subcommands.Command.Name.

func (*State) SetFlags

func (*State) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*State) Synopsis

func (*State) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*State) Usage

func (*State) Usage() string

Usage implements subcommands.Command.Usage.

type Statefile

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

Statefile implements subcommands.Command for the "statefile" command.

func (*Statefile) Execute

func (s *Statefile) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Statefile) Name

func (*Statefile) Name() string

Name implements subcommands.Command.

func (*Statefile) SetFlags

func (s *Statefile) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.

func (*Statefile) Synopsis

func (*Statefile) Synopsis() string

Synopsis implements subcommands.Command.

func (*Statefile) Usage

func (*Statefile) Usage() string

Usage implements subcommands.Command.

type Symbolize

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

Symbolize implements subcommands.Command for the "symbolize" command.

func (*Symbolize) Execute

func (c *Symbolize) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Symbolize) Name

func (*Symbolize) Name() string

Name implements subcommands.Command.Name.

func (*Symbolize) SetFlags

func (c *Symbolize) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Symbolize) Synopsis

func (*Symbolize) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Symbolize) Usage

func (*Symbolize) Usage() string

Usage implements subcommands.Command.Usage.

type SyscallDoc

type SyscallDoc struct {
	Name string `json:"name"`

	Support string   `json:"support"`
	Note    string   `json:"note,omitempty"`
	URLs    []string `json:"urls,omitempty"`
	// contains filtered or unexported fields
}

SyscallDoc represents a single item of syscall documentation.

type Syscalls

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

Syscalls implements subcommands.Command for the "syscalls" command.

func (*Syscalls) Execute

func (s *Syscalls) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Syscalls) Name

func (*Syscalls) Name() string

Name implements subcommands.Command.Name.

func (*Syscalls) SetFlags

func (s *Syscalls) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Syscalls) Synopsis

func (*Syscalls) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Syscalls) Usage

func (*Syscalls) Usage() string

Usage implements subcommands.Command.Usage.

type Uninstall

type Uninstall struct {
	ConfigFile string
	Runtime    string
}

Uninstall implements subcommands.Command.

func (*Uninstall) Execute

func (u *Uninstall) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute.

func (*Uninstall) Name

func (*Uninstall) Name() string

Name implements subcommands.Command.Name.

func (*Uninstall) SetFlags

func (u *Uninstall) SetFlags(fs *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Uninstall) Synopsis

func (*Uninstall) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Uninstall) Usage

func (*Uninstall) Usage() string

Usage implements subcommands.Command.Usage.

type Wait

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

Wait implements subcommands.Command for the "wait" command.

func (*Wait) Execute

func (wt *Wait) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) subcommands.ExitStatus

Execute implements subcommands.Command.Execute. It waits for a process in a container to exit before returning.

func (*Wait) Name

func (*Wait) Name() string

Name implements subcommands.Command.Name.

func (*Wait) SetFlags

func (wt *Wait) SetFlags(f *flag.FlagSet)

SetFlags implements subcommands.Command.SetFlags.

func (*Wait) Synopsis

func (*Wait) Synopsis() string

Synopsis implements subcommands.Command.Synopsis.

func (*Wait) Usage

func (*Wait) Usage() string

Usage implements subcommands.Command.Usage.

Jump to

Keyboard shortcuts

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