Revert previous sdlgo example change 75/7975/1 f-release
authorTimo Tietavainen <timo.tietavainen@nokia.com>
Tue, 22 Mar 2022 13:39:04 +0000 (15:39 +0200)
committerTimo Tietavainen <timo.tietavainen@nokia.com>
Tue, 22 Mar 2022 13:39:04 +0000 (15:39 +0200)
Revert example.go change done by the commit 6ffe956f91, because that
change was a mishap.

Issue-Id: RIC-893

Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: I0566eba4ca70f735a2bf5da755c44752618e98d3

example/example.go

index 33a9194..aee1c19 100644 (file)
@@ -26,7 +26,6 @@ import (
        "fmt"
 
        "gerrit.o-ran-sc.org/r/ric-plt/sdlgo"
-       "time"
 )
 
 var sdl *sdlgo.SyncStorage
@@ -60,28 +59,8 @@ func exampleClose() {
        sdl.Close()
 }
 
-func sdlNotify(ch string, events ...string) {
-       fmt.Printf("CB1 channel=%+v, events=%+v\n", ch, events[0])
-}
-
-func sdlNotify2(ch string, events ...string) {
-       fmt.Printf("CB2 channel=%+v, events=%+v\n", ch, events[0])
-}
-
 func main() {
-       sdl.SubscribeChannel("dcapterm_subsRTPM-localhost:55566", sdlNotify, "my-ch")
-       sdl.SubscribeChannel("dcapterm_subsRTPM-localhost:55565", sdlNotify2, "my-ch")
-       time.Sleep(3 * time.Second)
-       sdl.SetAndPublish("dcapterm_subsRTPM-localhost:55566", []string{"my-ch", "my-event1"}, "my-key", "my-data")
-       sdl.SetAndPublish("dcapterm_subsRTPM-localhost:55565", []string{"my-ch", "my-event2"}, "my-key", "my-data")
-
-       time.Sleep(2 * time.Second)
-       //sdl.UnsubscribeChannel("dcapterm_subsRTPM-localhost:55565", "my-ch")
-       //time.Sleep(2 * time.Second)
-       //sdl.SetAndPublish("dcapterm_subsRTPM-localhost:55565", []string{"my-ch", "my-event2"}, "my-key", "my-data")
-       time.Sleep(2 * time.Second)
-
-       //exampleSet()
-       //exampleGet()
-       //exampleClose()
+       exampleSet()
+       exampleGet()
+       exampleClose()
 }