🐛 Bug fixes on server register
This commit is contained in:
@ -18,11 +18,10 @@ func Register() error {
|
||||
return err
|
||||
}
|
||||
|
||||
httpBind := strings.SplitN(viper.GetString("bind"), ":", 2)
|
||||
grpcBind := strings.SplitN(viper.GetString("grpc_bind"), ":", 2)
|
||||
|
||||
outboundIp, _ := GetOutboundIP()
|
||||
port, _ := strconv.Atoi(httpBind[1])
|
||||
port, _ := strconv.Atoi(grpcBind[1])
|
||||
|
||||
registration := new(api.AgentServiceRegistration)
|
||||
registration.ID = viper.GetString("id")
|
||||
|
11
pkg/main.go
11
pkg/main.go
@ -1,7 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"git.solsynth.dev/hydrogen/interactive/pkg/internal"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
pkg "git.solsynth.dev/hydrogen/interactive/pkg/internal"
|
||||
"git.solsynth.dev/hydrogen/interactive/pkg/internal/database"
|
||||
"git.solsynth.dev/hydrogen/interactive/pkg/internal/gap"
|
||||
"git.solsynth.dev/hydrogen/interactive/pkg/internal/grpc"
|
||||
@ -11,9 +15,6 @@ import (
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/spf13/viper"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -42,7 +43,7 @@ func main() {
|
||||
|
||||
// Connect other services
|
||||
if err := gap.Register(); err != nil {
|
||||
log.Fatal().Err(err).Msg("An error occurred when connecting to paperclip...")
|
||||
log.Fatal().Err(err).Msg("An error occurred when connecting to consul...")
|
||||
} else {
|
||||
gap.NewHyperClient()
|
||||
}
|
||||
|
Reference in New Issue
Block a user