Skip to content

Commit

Permalink
remove local gclient.go file
Browse files Browse the repository at this point in the history
Signed-off-by: gatici <[email protected]>
  • Loading branch information
gatici committed Oct 17, 2024
1 parent 54e51b9 commit 335b3b4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 213 deletions.
10 changes: 5 additions & 5 deletions factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (
"os"
"time"

grpcClient "github.com/omec-project/config5g/proto/client"
protos "github.com/omec-project/config5g/proto/sdcoreConfig"
"github.com/omec-project/nrf/logger"
"go.uber.org/zap"
"gopkg.in/yaml.v2"

"github.com/omec-project/nrf/logger"
)

var ManagedByConfigPod bool
Expand Down Expand Up @@ -52,7 +52,7 @@ func InitConfigFactory(f string) error {
initLog.Infof("DefaultPlmnId Mnc %v, Mcc %v", NrfConfig.Configuration.DefaultPlmnId.Mnc, NrfConfig.Configuration.DefaultPlmnId.Mcc)
if os.Getenv("MANAGED_BY_CONFIG_POD") == "true" {
initLog.Infoln("MANAGED_BY_CONFIG_POD is true")
client, err := ConnectToConfigServer(NrfConfig.Configuration.WebuiUri)
client, err := grpcClient.ConnectToConfigServer(NrfConfig.Configuration.WebuiUri)
if err != nil {
go updateConfig(client)
}
Expand All @@ -64,7 +64,7 @@ func InitConfigFactory(f string) error {

// updateConfig connects the config pod GRPC server and subscribes the config changes
// then updates NRF configuration
func updateConfig(client ConfClient) {
func updateConfig(client grpcClient.ConfClient) {
var stream protos.ConfigService_NetworkSliceSubscribeClient
var err error
var configChannel chan *protos.NetworkSliceResponse
Expand Down Expand Up @@ -92,7 +92,7 @@ func updateConfig(client ConfClient) {
}

} else {
client, err = ConnectToConfigServer(NrfConfig.Configuration.WebuiUri)
client, err = grpcClient.ConnectToConfigServer(NrfConfig.Configuration.WebuiUri)
if err != nil {
initLog.Errorf("%+v", err)
}
Expand Down
204 changes: 0 additions & 204 deletions factory/gclient.go

This file was deleted.

7 changes: 6 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module github.com/omec-project/nrf

go 1.21

replace github.com/omec-project/config5g => /home/gatici/omec/config5g

require (
github.com/antihax/optional v1.0.0
github.com/gin-gonic/gin v1.10.0
Expand All @@ -16,7 +18,6 @@ require (
github.com/urfave/cli v1.22.16
go.mongodb.org/mongo-driver v1.17.1
go.uber.org/zap v1.27.0
google.golang.org/grpc v1.67.0
gopkg.in/yaml.v2 v2.4.0
)

Expand Down Expand Up @@ -71,7 +72,11 @@ require (
golang.org/x/text v0.19.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/grpc v1.67.1 // indirect
<<<<<<< HEAD
google.golang.org/protobuf v1.34.2 // indirect
=======
google.golang.org/protobuf v1.35.1 // indirect
>>>>>>> 68279d2 (remove local gclient.go file)
gopkg.in/h2non/gock.v1 v1.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E=
google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
Expand Down
2 changes: 1 addition & 1 deletion service/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func (nrf *NRF) Start() {
if os.Getenv("MANAGED_BY_CONFIG_POD") == "true" {
initLog.Infoln("MANAGED_BY_CONFIG_POD is true")
} else {
initLog.Infoln("Use helm chart config ")
initLog.Infoln("Use helm chart config")
}
bindAddr := factory.NrfConfig.GetSbiBindingAddr()
initLog.Infof("Binding addr: [%s]", bindAddr)
Expand Down

0 comments on commit 335b3b4

Please sign in to comment.