🐛 Bug fixes on server register
This commit is contained in:
parent
dc86e33b9e
commit
a4ad17b038
2
go.mod
2
go.mod
@ -4,7 +4,7 @@ go 1.21.6
|
||||
|
||||
require (
|
||||
git.solsynth.dev/hydrogen/paperclip v0.0.0-20240622051057-0f56dba45745
|
||||
git.solsynth.dev/hydrogen/passport v0.0.0-20240622050421-7007cda8f210
|
||||
git.solsynth.dev/hydrogen/passport v0.0.0-20240622131052-18ae5f12e2e7
|
||||
github.com/go-playground/validator/v10 v10.17.0
|
||||
github.com/gofiber/fiber/v2 v2.52.4
|
||||
github.com/gofiber/template/html/v2 v2.1.1
|
||||
|
2
go.sum
2
go.sum
@ -2,6 +2,8 @@ git.solsynth.dev/hydrogen/paperclip v0.0.0-20240622051057-0f56dba45745 h1:40BUsQ
|
||||
git.solsynth.dev/hydrogen/paperclip v0.0.0-20240622051057-0f56dba45745/go.mod h1:FsQGSLTl0gvo+9Jmbot02S72suyF9tFTrzDj70Xhifo=
|
||||
git.solsynth.dev/hydrogen/passport v0.0.0-20240622050421-7007cda8f210 h1:DM4AVhG/l3cOfmhA5IDFgn120BL2PEATnPQDtINIS/Q=
|
||||
git.solsynth.dev/hydrogen/passport v0.0.0-20240622050421-7007cda8f210/go.mod h1:XTNEOv75sZI52sNgpum7Z/tgYmlRcHfK7VdhyV7kc0w=
|
||||
git.solsynth.dev/hydrogen/passport v0.0.0-20240622131052-18ae5f12e2e7 h1:4zoeDzrAY9/C9RaXsfv7vDE0cC/j94IR1vVpIQEEB6A=
|
||||
git.solsynth.dev/hydrogen/passport v0.0.0-20240622131052-18ae5f12e2e7/go.mod h1:tUr7x1v0trG3ALDacdDuhJiPRPgFhJ1Si9OqNlYbgSk=
|
||||
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
|
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user