X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fsbi%2Ftypes.go;h=357d87c6e8108854caabd09984a3b63d2138b3bc;hb=refs%2Fchanges%2F90%2F490%2F1;hp=1254e93adbf96d2b504c65a438bfe0d863739ac8;hpb=871fa393844ce1b61b8d5218d27687d9fc05803a;p=ric-plt%2Frtmgr.git diff --git a/pkg/sbi/types.go b/pkg/sbi/types.go index 1254e93..357d87c 100644 --- a/pkg/sbi/types.go +++ b/pkg/sbi/types.go @@ -24,20 +24,30 @@ package sbi -type distributeAll func(*[]string) error -type openSocket func(string) error -type closeSocket func() error +import "routing-manager/pkg/rtmgr" -type SbiEngine struct { +type SbiEngineConfig struct { Name string Version string - Protocol string + Protocol string + Instance SbiEngine + IsAvailable bool } -type SbiEngineConfig struct { - Engine SbiEngine - OpenSocket openSocket - CloseSocket closeSocket - DistributeAll distributeAll - IsAvailable bool +type SbiEngine interface { + Initialize(string) error + Terminate() error + DistributeAll(*[]string) error + AddEndpoint(*rtmgr.Endpoint) error + DeleteEndpoint(*rtmgr.Endpoint) error + UpdateEndpoints(*rtmgr.RicComponents) } + +type NngSocket interface { + Listen(string) error + Send([]byte) error + Close() error + DialOptions(string, map[string]interface{}) error +} + +type CreateNewNngSocketHandler func() (NngSocket,error)