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