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.
}
Beispiel #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.
}
Beispiel #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.
}
Beispiel #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)
}
Beispiel #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))
}
Beispiel #7
0
func main() {
	plugin.Start(new(TestWithOrgs))
}
Beispiel #8
0
func main() {
	plugin.Start(new(MultiCmd))
}
func main() {
	plugin.Start(new(UsageReportCmd))
}
Beispiel #10
0
func main() {
	plugin.Start(new(AppEnv))
}
Beispiel #11
0
func main() {
	sshPlugin := &SSHPlugin{}
	plugin.Start(sshPlugin)
}
Beispiel #12
0
func main() {
	plugin.Start(new(dcp.DeployCloudPlugin))
}
Beispiel #13
0
func main() {
	plugin.Start(new(FirehoseStatsCmd))
}
Beispiel #14
0
func main() {
	plugin.Start(&OpenPlugin{})
}
Beispiel #15
0
func main() {
	plugin.Start(new(Test2))
}
func main() {
	plugin.Start(new(DiegoEnabler))
}
Beispiel #17
0
func main() {
	plugin.Start(new(TestWithPush))
}
Beispiel #18
0
func main() {
	plugin.Start(new(TestWithHelp))
}
func main() {
	plugin.Start(new(Wildcard))
	//plugin.Start(newWildcard())
}
Beispiel #20
0
func main() {
	plugin.Start(new(EmptyPlugin))
}
Beispiel #21
0
func main() {
	plugin.Start(new(CLI_Recorder))
}
func main() {
	plugin.Start(new(DiegoMigrationCmd))
}
Beispiel #23
0
func main() {
	plugin.Start(&watch.Plugin{
		Session: &scp.Session{},
		UI:      terminal.NewUI(os.Stdin, terminal.NewTeePrinter()),
	})
}
Beispiel #24
0
func main() {
	plugin.Start(new(HelloWorld))
}
Beispiel #25
0
func main() {
	plugin.Start(new(DemoCmd))
}
func main() {
	plugin.Start(new(BuildpackManager))
}
Beispiel #27
0
func main() {
	plugin.Start(new(CopyEnv))
}
Beispiel #28
0
func main() {
	plugin.Start(new(NozzlerCmd))
}
Beispiel #29
0
func main() {
	plugin.Start(&AutopilotPlugin{})
}
Beispiel #30
0
func main() {
	plugin.Start(new(MupsPlugin))
}