Code Review
/
ric-plt
/
rtmgr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Handling of subscription merge and inclusion of RMR lib from xapp-framework
[ric-plt/rtmgr.git]
/
pkg
/
sbi
/
types.go
diff --git
a/pkg/sbi/types.go
b/pkg/sbi/types.go
index
f971ff5
..
d024e94
100644
(file)
--- a/
pkg/sbi/types.go
+++ b/
pkg/sbi/types.go
@@
-14,37
+14,44
@@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+
+ This source code is part of the near-RT RIC (RAN Intelligent Controller)
+ platform project (RICP).
+
==================================================================================
*/
/*
Mnemonic: sbi/types.go
==================================================================================
*/
/*
Mnemonic: sbi/types.go
- Abstract: Contain
e
s SBI (SouthBound Interface) specific types
+ Abstract: Contains SBI (SouthBound Interface) specific types
Date: 16 March 2019
*/
package sbi
Date: 16 March 2019
*/
package sbi
-import "rtmgr"
-
-type distributeAll func(*[]string) error
-type openSocket func(string) error
-type closeSocket func() error
-type createEndpointSocket func(*rtmgr.Endpoint) error
-type destroyEndpointSocket func(*rtmgr.Endpoint) error
+import "routing-manager/pkg/rtmgr"
+type EngineConfig struct {
+ Name string
+ Version string
+ Protocol string
+ Instance Engine
+ IsAvailable bool
+}
-type SbiEngine struct {
- Name string
- Version string
- Protocol string
+type Engine interface {
+ Initialize(string) error
+ Terminate() error
+ DistributeAll(*[]string) error
+ AddEndpoint(*rtmgr.Endpoint) error
+ DeleteEndpoint(*rtmgr.Endpoint) error
+ UpdateEndpoints(*rtmgr.RicComponents)
}
}
-type SbiEngineConfig struct {
- Engine SbiEngine
- OpenSocket openSocket
- CloseSocket closeSocket
- CreateEndpointSocket createEndpointSocket
- DestroyEndpointSocket destroyEndpointSocket
- DistributeAll distributeAll
- IsAvailable bool
+type NngSocket interface {
+ Listen(string) error
+ Send([]byte) error
+ Close() error
+ DialOptions(string, map[string]interface{}) error
}
}
+
+type CreateNewNngSocketHandler func() (NngSocket, error)