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

Index

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.

Directories

PathSynopsis
daemon
helpPackage help provides the help command.
qemu-build
qemu-guest-toolsPackage qemuguesttools implements the command that runs inside a QEMU VM.
qemu-run
schema
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.
shell-server
work

Package commands imports 5 packages (graph) and is imported by 11 packages. Updated 2017-05-08. Refresh now. Tools for package owners.