VOL-3501 Refeactoring of code for event handling
Change-Id: I7d225a7b3b664efdaef5a6c9c84a118bac594be7
diff --git a/cmd/openolt-adapter/main.go b/cmd/openolt-adapter/main.go
index 86e9549..4f0153d 100644
--- a/cmd/openolt-adapter/main.go
+++ b/cmd/openolt-adapter/main.go
@@ -26,12 +26,13 @@
"syscall"
"time"
- "github.com/opencord/voltha-lib-go/v4/pkg/adapters/adapterif"
-
"github.com/opencord/voltha-lib-go/v4/pkg/adapters"
+ "github.com/opencord/voltha-lib-go/v4/pkg/adapters/adapterif"
com "github.com/opencord/voltha-lib-go/v4/pkg/adapters/common"
conf "github.com/opencord/voltha-lib-go/v4/pkg/config"
"github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore"
+ "github.com/opencord/voltha-lib-go/v4/pkg/events"
+ "github.com/opencord/voltha-lib-go/v4/pkg/events/eventif"
"github.com/opencord/voltha-lib-go/v4/pkg/kafka"
"github.com/opencord/voltha-lib-go/v4/pkg/log"
"github.com/opencord/voltha-lib-go/v4/pkg/probe"
@@ -51,7 +52,7 @@
kip kafka.InterContainerProxy
coreProxy adapterif.CoreProxy
adapterProxy adapterif.AdapterProxy
- eventProxy adapterif.EventProxy
+ eventProxy eventif.EventProxy
halted bool
exitChannel chan int
receiverChannels []<-chan *ic.InterContainerMessage
@@ -125,7 +126,7 @@
a.adapterProxy = com.NewAdapterProxy(ctx, a.kip, a.config.CoreTopic, cm.Backend)
// Create the event proxy to post events to KAFKA
- a.eventProxy = com.NewEventProxy(com.MsgClient(a.kafkaClient), com.MsgTopic(kafka.Topic{Name: a.config.EventTopic}))
+ a.eventProxy = events.NewEventProxy(events.MsgClient(a.kafkaClient), events.MsgTopic(kafka.Topic{Name: a.config.EventTopic}))
// Create the open OLT adapter
if a.iAdapter, err = a.startOpenOLT(ctx, a.kip, a.coreProxy, a.adapterProxy, a.eventProxy, a.config, cm); err != nil {
@@ -345,7 +346,7 @@
}
func (a *adapter) startOpenOLT(ctx context.Context, kip kafka.InterContainerProxy,
- cp adapterif.CoreProxy, ap adapterif.AdapterProxy, ep adapterif.EventProxy,
+ cp adapterif.CoreProxy, ap adapterif.AdapterProxy, ep eventif.EventProxy,
cfg *config.AdapterFlags, cm *conf.ConfigManager) (*ac.OpenOLT, error) {
logger.Info(ctx, "starting-open-olt")
var err error