X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=inline;f=pkg%2Fsbi%2Fnngpush.go;h=bb39be43ce142b083f2dfad51ffee46be345cb1e;hb=eb2ff0d217caf158dd15424bf70f8aa79c3742b1;hp=6f2535c498d5cc5d146e71d55902410d42a35187;hpb=92162653c9741f2417d1a36ec1c211d6863d0a68;p=ric-plt%2Frtmgr.git diff --git a/pkg/sbi/nngpush.go b/pkg/sbi/nngpush.go index 6f2535c..bb39be4 100644 --- a/pkg/sbi/nngpush.go +++ b/pkg/sbi/nngpush.go @@ -99,9 +99,9 @@ func (c *NngPush) AddEndpoint(ep *rtmgr.Endpoint) error { func (c *NngPush) DeleteEndpoint(ep *rtmgr.Endpoint) error { rtmgr.Logger.Debug("Invoked sbi. DeleteEndpoint") rtmgr.Logger.Debug("args: %v", (*ep)) - if err:= ep.Socket.(NngSocket).Close(); err != nil { - return errors.New("can't close push socket of endpoint:" + ep.Uuid + " due to: " + err.Error()) - } + if err := ep.Socket.(NngSocket).Close(); err != nil { + return errors.New("can't close push socket of endpoint:" + ep.Uuid + " due to: " + err.Error()) + } return nil } @@ -137,11 +137,11 @@ func (c *NngPush) DistributeAll(policies *[]string) error { } func (c *NngPush) send(ep *rtmgr.Endpoint, policies *[]string) { - rtmgr.Logger.Debug("Push policy to endpoint: "+ ep.Uuid) + rtmgr.Logger.Debug("Push policy to endpoint: " + ep.Uuid) for _, pe := range *policies { if err := ep.Socket.(NngSocket).Send([]byte(pe)); err != nil { rtmgr.Logger.Error("Unable to send policy entry due to: " + err.Error()) } } - rtmgr.Logger.Info("NNG PUSH to ednpoint " + ep.Uuid + ": OK (# of Entries:" + strconv.Itoa(len((*policies))) + ")") + rtmgr.Logger.Info("NNG PUSH to endpoint " + ep.Uuid + ": OK (# of Entries:" + strconv.Itoa(len((*policies))) + ")") }