cmds

package
v1.1.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OsArch    = ""
	GitCommit = ""
	BuildTime = ""
	Branch    = ""
	Version   = "latest"
)

--ldflags -X

View Source
var CmdWebhook = &cobra.Command{
	Use:   "webhook",
	Short: "Starts a HTTP server, useful for creating MutatingAdmissionWebhook",
	Long: `Starts a HTTP server, useful for creating MutatingAdmissionWebhook.
After deploying it to Kubernetes cluster, the Administrator needs to create a MutatingWebhookConfiguration
in the Kubernetes cluster to register remote webhook admission controllers.`,
	Args: cobra.MaximumNArgs(0),
	Run:  webhook.Main,
}
View Source
var RootCmd = &cobra.Command{
	Use:   "kubevpn",
	Short: "kubevpn",
	Long:  `kubevpn`,
}
View Source
var ServerCmd = &cobra.Command{
	Use:   "serve",
	Short: "Server side, startup traffic manager, forward inbound and outbound traffic",
	Long:  `Server side, startup traffic manager, forward inbound and outbound traffic.`,
	PreRun: func(*cobra.Command, []string) {
		util.InitLogger(config.Debug)
		go func() { log.Info(http.ListenAndServe("localhost:6060", nil)) }()
	},
	Run: func(cmd *cobra.Command, args []string) {
		err := handler.Start(context.Background(), route)
		if err != nil {
			log.Fatal(err)
		}
		select {}
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL