display private bind endpoint (#109)

This commit is contained in:
Michael Quigley 2022-11-28 15:52:54 -05:00
parent a3956509f3
commit e65752b3e7
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -10,6 +10,7 @@ import (
"github.com/openziti-test-kitchen/zrok/zrokdir"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"net/url"
"os"
"os/signal"
"syscall"
@ -39,6 +40,14 @@ func newAccessPrivateCommand() *accessPrivateCommand {
func (cmd *accessPrivateCommand) run(_ *cobra.Command, args []string) {
svcName := args[0]
endpointUrl, err := url.Parse("http://" + cmd.bindAddress)
if err != nil {
if !panicInstead {
showError("invalid endpoint address", err)
}
panic(err)
}
env, err := zrokdir.LoadEnvironment()
if err != nil {
if !panicInstead {
@ -88,6 +97,9 @@ func (cmd *accessPrivateCommand) run(_ *cobra.Command, args []string) {
}
panic(err)
}
logrus.Infof("access your service at: %v", endpointUrl.String())
if err := frontend.Run(); err != nil {
if !panicInstead {
showError("unable to run frontend", err)