Separate context for orchard dev (#56)

Fixes #51
This commit is contained in:
Fedor Korotkov
2023-03-24 13:10:35 -04:00
committed by GitHub
parent b1813a2a92
commit 63ba8b5532
2 changed files with 30 additions and 3 deletions
+8
View File
@@ -19,6 +19,7 @@ import (
"google.golang.org/grpc/keepalive"
"net"
"net/http"
"strings"
"time"
)
@@ -158,3 +159,10 @@ func (controller *Controller) Run(ctx context.Context) error {
return nil
}
func (controller *Controller) Address() string {
if strings.HasPrefix(controller.listenAddr, ":") {
return fmt.Sprintf("http://localhost%s", controller.listenAddr)
}
return controller.listenAddr
}