plugin

package
v6.6.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmdExists

func CmdExists(cmd string, availableCmds []Command) bool

func ServeCommand

func ServeCommand(cmd RpcPlugin)

*

  • This function is called by the plugin to setup their server. This allows us to call Run on the plugin
  • os.Args[1] port plugin rpc will be listening on
  • os.Args[2] port CF_CLI rpc server is running on
  • os.Args[3] **OPTIONAL**
  • install-plugin - used to fetch the command name

*

Types

type Command

type Command struct {
	Name     string
	HelpText string
}

type RpcPlugin

type RpcPlugin interface {
	//run is passed in all the command line parameter arguments and
	//an object containing all of the cli commands available to them
	Run(args string, reply *bool) error
	CmdExists(args string, exists *bool) error

	//We only care about the return value.
	//TODO: the first param could be used for obtaining help of a specific command.
	ListCmds(empty string, cmdList *[]Command) error
}

*

Command interface needs to be implementd for a runnable sub-command of `cf`

*

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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