mirror of
https://github.com/openziti/zrok.git
synced 2025-06-20 17:58:50 +02:00
display private bind endpoint (#109)
This commit is contained in:
parent
a3956509f3
commit
e65752b3e7
@ -10,6 +10,7 @@ import (
|
|||||||
"github.com/openziti-test-kitchen/zrok/zrokdir"
|
"github.com/openziti-test-kitchen/zrok/zrokdir"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"syscall"
|
"syscall"
|
||||||
@ -39,6 +40,14 @@ func newAccessPrivateCommand() *accessPrivateCommand {
|
|||||||
func (cmd *accessPrivateCommand) run(_ *cobra.Command, args []string) {
|
func (cmd *accessPrivateCommand) run(_ *cobra.Command, args []string) {
|
||||||
svcName := args[0]
|
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()
|
env, err := zrokdir.LoadEnvironment()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if !panicInstead {
|
if !panicInstead {
|
||||||
@ -88,6 +97,9 @@ func (cmd *accessPrivateCommand) run(_ *cobra.Command, args []string) {
|
|||||||
}
|
}
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logrus.Infof("access your service at: %v", endpointUrl.String())
|
||||||
|
|
||||||
if err := frontend.Run(); err != nil {
|
if err := frontend.Run(); err != nil {
|
||||||
if !panicInstead {
|
if !panicInstead {
|
||||||
showError("unable to run frontend", err)
|
showError("unable to run frontend", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user