taskcluster-worker: github.com/taskcluster/taskcluster-worker/commands Index | Files | Directories

package commands

import "github.com/taskcluster/taskcluster-worker/commands"

Package commands exposes a run method for main() to call


Package Files

commandprovider.go run.go

func Commands Uses

func Commands() map[string]CommandProvider

Commands returns a map from name to registered CommandProvider.

func Register Uses

func Register(name string, provider CommandProvider)

Register will register a CommandProvider, this is intended to be used during sstatic initializtion and will panic if name is already in use.

func Run Uses

func Run(argv []string) (exitCode int)

Run will parse command line arguments and run available commands.

type CommandProvider Uses

type CommandProvider interface {
    // Summary returns a one-line description of what this command is for.
    Summary() string
    // Usage returns the docopt usage string, used to parse arguments.
    Usage() string
    // Execute is called with parsed docopt result, return true/false if the
    // utility should exit zero or non-zero.
    Execute(args map[string]interface{}) bool

CommandProvider is implemented by anyone who wishes to provide a command line command that the worker should support.


helpPackage help provides the help command.
qemu-guest-toolsPackage qemuguesttools implements the command that runs inside a QEMU VM.
shellPackage shell provides a CommandProvider that implements a CLI tool for opening to a interactive shell to an interactive taskcluster-worker task in your terminal.
versionPackage version provides a CommandProvider that displays version number and git revision, these values are also exported through methods so that they can be read from other packages.

Package commands imports 5 packages (graph) and is imported by 12 packages. Updated 2018-06-21. Refresh now. Tools for package owners.