brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertgmoss <>
Subject [GitHub] brooklyn-client pull request: Adds support for Plugins
Date Tue, 26 Apr 2016 21:05:15 GMT
GitHub user robertgmoss opened a pull request:

    Adds support for Plugins

    A sample plugin would look like this:
    package main
    import (
    type SamplePlugin struct {}
    func (c *SamplePlugin) Run(plugin plugin.Connection, args []string)  {
    	if args[0] == "sample-command" {
    		fmt.Println("Running the sample plugin")
    		out := plugin.CoreCommand(strings.Split("br apps", " ")...)
    		for i, e := range out {
    			fmt.Printf("%v %v\n", i, e)
    func (c *SamplePlugin) GetMetadata() plugin.PluginMetadata {
    	return plugin.PluginMetadata{
    		Name: "SamplePlugin",
    		Commands: []plugin.Command{
    				Name: "sample-command",
    				Alias: "sc",
    				HelpText: "A Sample Command",
    				UsageDetails: plugin.Usage{
    					Usage: "sample-command\n br sample-command",
    func main() {
    which should be compiled with `go build`.  The resulting artifact should be installed
with `br install-plugin <artifact-location>`, which will copy the artifact to either
`$HOME` or `$BRCLI_HOME/plugins` if it is set; this location is required to on `$PATH` for
the plugin to be executed.    

You can merge this pull request into a Git repository by running:

    $ git pull plugin-support

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #18
commit 78030a2f4d896507e0d2ee6643dafbb925185947
Author: Robert Moss <>
Date:   2016-04-26T20:49:35Z

    Adds support for Plugins


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message