diff --git a/cmd/zrok/main.go b/cmd/zrok/main.go index 86fa6556..3d83c722 100644 --- a/cmd/zrok/main.go +++ b/cmd/zrok/main.go @@ -2,6 +2,7 @@ package main import ( "github.com/michaelquigley/pfxlog" + "github.com/openziti-test-kitchen/zrok/http" "github.com/openziti-test-kitchen/zrok/proxy" "github.com/sirupsen/logrus" "github.com/spf13/cobra" @@ -13,6 +14,7 @@ import ( 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.AddCommand(httpCmd) rootCmd.AddCommand(proxyCmd) } @@ -37,6 +39,16 @@ var proxyCmd = &cobra.Command{ }, } +var httpCmd = &cobra.Command{ + Use: "http ", + Short: "Start an http endpoint", + Run: func(_ *cobra.Command, args []string) { + if err := http.Run(&http.Config{EndpointAddress: args[0]}); err != nil { + panic(err) + } + }, +} + func main() { if err := rootCmd.Execute(); err != nil { panic(err) diff --git a/http/config.go b/http/config.go new file mode 100644 index 00000000..0e0659c8 --- /dev/null +++ b/http/config.go @@ -0,0 +1,5 @@ +package http + +type Config struct { + EndpointAddress string +} diff --git a/http/http.go b/http/http.go new file mode 100644 index 00000000..7ce5883c --- /dev/null +++ b/http/http.go @@ -0,0 +1,5 @@ +package http + +func Run(cfg *Config) error { + return nil +}