mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-27 17:25:16 +00:00
add grpc server options
This commit is contained in:
parent
2b615d4933
commit
730f50c548
|
@ -28,8 +28,12 @@ func init() {
|
||||||
RunCmd.Flags().String("totp-account-name", "", "")
|
RunCmd.Flags().String("totp-account-name", "", "")
|
||||||
RunCmd.Flags().Bool("enable-webserver", false, "enable webserver")
|
RunCmd.Flags().Bool("enable-webserver", false, "enable webserver")
|
||||||
RunCmd.Flags().Bool("enable-web-server", false, "legacy option, this is renamed to --enable-webserver")
|
RunCmd.Flags().Bool("enable-web-server", false, "legacy option, this is renamed to --enable-webserver")
|
||||||
RunCmd.Flags().String("cpu-profile", "", "cpu profile")
|
|
||||||
RunCmd.Flags().String("webserver-bind", ":8080", "webserver binding")
|
RunCmd.Flags().String("webserver-bind", ":8080", "webserver binding")
|
||||||
|
|
||||||
|
RunCmd.Flags().Bool("enable-grpc", false, "enable grpc server")
|
||||||
|
RunCmd.Flags().String("grpc-bind", ":6688", "grpc server binding")
|
||||||
|
|
||||||
|
RunCmd.Flags().String("cpu-profile", "", "cpu profile")
|
||||||
RunCmd.Flags().Bool("setup", false, "use setup mode")
|
RunCmd.Flags().Bool("setup", false, "use setup mode")
|
||||||
RootCmd.AddCommand(RunCmd)
|
RootCmd.AddCommand(RunCmd)
|
||||||
}
|
}
|
||||||
|
@ -40,7 +44,7 @@ var RunCmd = &cobra.Command{
|
||||||
|
|
||||||
// SilenceUsage is an option to silence usage when an error occurs.
|
// SilenceUsage is an option to silence usage when an error occurs.
|
||||||
SilenceUsage: true,
|
SilenceUsage: true,
|
||||||
RunE: run,
|
RunE: run,
|
||||||
}
|
}
|
||||||
|
|
||||||
func runSetup(baseCtx context.Context, userConfig *bbgo.Config, enableApiServer bool) error {
|
func runSetup(baseCtx context.Context, userConfig *bbgo.Config, enableApiServer bool) error {
|
||||||
|
|
5
pkg/grpc/server.go
Normal file
5
pkg/grpc/server.go
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
package grpc
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user