func main() {

	logOut, _ := os.OpenFile("/tmp/firehose.stdout.log", os.O_WRONLY|os.O_APPEND|os.O_SYNC, 0755)
	logErr, _ := os.OpenFile("/tmp/firehose.stderr.log", os.O_WRONLY|os.O_APPEND|os.O_SYNC, 0755)
	os.Stdout = logOut
	os.Stderr = logErr

	// if err != nil {
	//     t.Fatalf("error opening file: %v", err)
	// }
	defer logOut.Close()
	defer logErr.Close()

	// Any initialization for your plugin can be handled here
	//
	// Note: to run the plugin.Start method, we pass in a pointer to the struct
	// implementing the interface defined at "github.com/cloudfoundry/cli/plugin/plugin.go"
	//
	// Note: The plugin's main() method is invoked at install time to collect
	// metadata. The plugin will exit 0 and the Run([]string) method will not be
	// invoked.
	fmt.Print("Starting plugin\n")

	plugin.Start(new(FirehoseInspector))
	// Plugin code should be written in the Run([]string) method,
	// ensuring the plugin environment is bootstrapped.
}
Example #2
0
/*
* Unlike most Go programs, the `Main()` function will not be used to run all of the
* commands provided in your plugin. Main will be used to initialize the plugin
* process, as well as any dependencies you might require for your
* plugin.
 */
func main() {

	// Any initialization for your plugin can be handled here

	// Note: The plugin's main() method is invoked at install time to collect
	// metadata. The plugin will exit 0 and the Run([]string) method will not be
	// invoked.

	// About debug Locally:
	// The plugin interface hides panics from stdout, so in order to get panic info,
	// you can run this plugin outside of the plugin architecture by setting debuglocally = true.

	// example usage for local run: go run main.go download APP_NAME --overwrite 2> err.txt
	// note the lack of 'cf'

	debugLocally := false
	if debugLocally {
		var run DownloadPlugin
		run.Run(nil, os.Args[1:])
	} else {
		plugin.Start(new(DownloadPlugin))
	}

	// Plugin code should be written in the Run([]string) method,
	// ensuring the plugin environment is bootstrapped.
}
Example #3
0
/*
* Unlike most Go programs, the `Main()` function will not be used to run all of the
* commands provided in your plugin. Main will be used to initialize the plugin
* process, as well as any dependencies you might require for your
* plugin.
 */
func main() {
	// Any initialization for your plugin can be handled here
	//
	// Note: to run the plugin.Start method, we pass in a pointer to the struct
	// implementing the interface defined at "github.com/cloudfoundry/cli/plugin/plugin.go"
	//
	// Note: The plugin's main() method is invoked at install time to collect
	// metadata. The plugin will exit 0 and the Run([]string) method will not be
	// invoked.
	plugin.Start(new(BasicPlugin))
	// Plugin code should be written in the Run([]string) method,
	// ensuring the plugin environment is bootstrapped.
}
Example #4
0
func main() {
	// T needs to point to a translate func, otherwise cf internals blow up
	i18n.T, _ = go_i18n.Tfunc("")
	p := CfPlugin{
		Deployer: &BlueGreenDeploy{
			ErrorFunc: func(message string, err error) {
				fmt.Printf("%v - %v\n", message, err)
				os.Exit(1)
			},
			Out: os.Stdout,
		},
	}

	plugin.Start(&p)
}
Example #5
0
/*
* Unlike most Go programs, the `Main()` function will not be used to run all of the
* commands provided in your plugin. Main will be used to initialize the plugin
* process, as well as any dependencies you might require for your
* plugin.
 */
func main() {
	plugin.Start(new(FastPushPlugin))
}
func main() {
	plugin.Start(new(IpQuery))
}
Example #7
0
func main() {
	plugin.Start(new(TestWithOrgs))
}
Example #8
0
func main() {
	plugin.Start(new(MultiCmd))
}
Example #9
0
func main() {
	plugin.Start(new(UsageReportCmd))
}
Example #10
0
func main() {
	plugin.Start(new(AppEnv))
}
Example #11
0
func main() {
	sshPlugin := &SSHPlugin{}
	plugin.Start(sshPlugin)
}
Example #12
0
func main() {
	plugin.Start(new(dcp.DeployCloudPlugin))
}
Example #13
0
func main() {
	plugin.Start(new(FirehoseStatsCmd))
}
Example #14
0
func main() {
	plugin.Start(&OpenPlugin{})
}
Example #15
0
func main() {
	plugin.Start(new(Test2))
}
func main() {
	plugin.Start(new(DiegoEnabler))
}
Example #17
0
func main() {
	plugin.Start(new(TestWithPush))
}
Example #18
0
func main() {
	plugin.Start(new(TestWithHelp))
}
func main() {
	plugin.Start(new(Wildcard))
	//plugin.Start(newWildcard())
}
Example #20
0
func main() {
	plugin.Start(new(EmptyPlugin))
}
Example #21
0
func main() {
	plugin.Start(new(CLI_Recorder))
}
func main() {
	plugin.Start(new(DiegoMigrationCmd))
}
Example #23
0
func main() {
	plugin.Start(&watch.Plugin{
		Session: &scp.Session{},
		UI:      terminal.NewUI(os.Stdin, terminal.NewTeePrinter()),
	})
}
Example #24
0
func main() {
	plugin.Start(new(HelloWorld))
}
Example #25
0
func main() {
	plugin.Start(new(DemoCmd))
}
func main() {
	plugin.Start(new(BuildpackManager))
}
Example #27
0
func main() {
	plugin.Start(new(CopyEnv))
}
Example #28
0
func main() {
	plugin.Start(new(NozzlerCmd))
}
Example #29
0
func main() {
	plugin.Start(&AutopilotPlugin{})
}
Example #30
0
func main() {
	plugin.Start(new(MupsPlugin))
}