mirror of
https://github.com/openziti/zrok.git
synced 2025-06-26 12:42:18 +02:00
http -> http bind, part 2 (#32)
This commit is contained in:
parent
73283660f8
commit
bb55008451
@ -24,7 +24,7 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(newHttpBindCommand().cmd)
|
||||
httpCmd.AddCommand(newHttpBindCommand().cmd)
|
||||
}
|
||||
|
||||
type httpBindCommand struct {
|
||||
@ -35,8 +35,8 @@ type httpBindCommand struct {
|
||||
|
||||
func newHttpBindCommand() *httpBindCommand {
|
||||
cmd := &cobra.Command{
|
||||
Use: "http <endpoint>",
|
||||
Short: "Start an HTTP terminator",
|
||||
Use: "bind <endpoint>",
|
||||
Short: "Create an HTTP binding",
|
||||
Args: cobra.ExactArgs(1),
|
||||
}
|
||||
command := &httpBindCommand{cmd: cmd}
|
||||
|
@ -13,6 +13,7 @@ func init() {
|
||||
pfxlog.GlobalInit(logrus.InfoLevel, pfxlog.DefaultOptions().SetTrimPrefix("github.com/openziti-test-kitchen/"))
|
||||
rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "enable verbose logging")
|
||||
rootCmd.PersistentFlags().StringVarP(&endpoint, "endpoint", "e", "localhost:10888", "zrok endpoint address")
|
||||
rootCmd.AddCommand(httpCmd)
|
||||
}
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
@ -27,6 +28,11 @@ var rootCmd = &cobra.Command{
|
||||
var verbose bool
|
||||
var endpoint string
|
||||
|
||||
var httpCmd = &cobra.Command{
|
||||
Use: "http",
|
||||
Short: "HTTP endpoint operations",
|
||||
}
|
||||
|
||||
func main() {
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
panic(err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user