Fix X2 setup route
[ric-plt/rtmgr.git] / pkg / rpe / types.go
index 69f01c4..491d152 100644 (file)
 */
 /*
   Mnemonic:    rpe/types.go
-  Abstract:    Containes RPE (Route Policy Engine) specific types
+  Abstract:    Contains RPE (Route Policy Engine) specific types
   Date:                12 March 2019
 */
 
 package rpe
 
-import "rtmgr"
+import "routing-manager/pkg/rtmgr"
 
-type generatePolicies func(*[]rtmgr.XApp) (*[]string)
+//type generatePolicies func(rtmgr.Endpoints) *[]string
+//type generateRouteTable func(rtmgr.Endpoints) *rtmgr.RouteTable
 
-type RpeEngine struct {
-       Name     string
-       Version  string
-       Protocol string
+type EngineConfig struct {
+       Name        string
+       Version     string
+       Protocol    string
+       Instance    Engine
+       IsAvailable bool
 }
 
-type RpeEngineConfig struct {
-       Engine           RpeEngine
-       GeneratePolicies generatePolicies
-       IsAvailable      bool
+type Engine interface {
+       GeneratePolicies(rtmgr.Endpoints) *[]string
+       GenerateRouteTable(rtmgr.Endpoints) *rtmgr.RouteTable
 }