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