Newer
Older
"code.fbi.h-da.de/cocsn/gosdn/database"
// Core is the representation of the controllers core
// deprecated
database database.Database
//Initialize does start-up housekeeping like reading controller config files
c = &Core{
database: database.Database{},
pndc: pndStore{},
sbic: sbiStore{},
}
c.sbic = sbiStore{
store{},
}
c.pndc = pndStore{
store{},
}
if err := createSouthboundInterfaces(); err != nil {
// AttachDatabase connects to the database and passes the connection to the controller core
// CreateSouthboundInterfaces initializes the controller with its supported SBIs
if err := c.sbic.add(&OpenConfig{id: uuid.New()}); err != nil {
return err
}
return nil
if err := initialize(ctx); err != nil {
log.WithFields(log.Fields{}).Error(err)
return err
}
log.WithFields(log.Fields{}).Info("initialisation finished")
for {
select {
case <-ctx.Done():
return nil
case <-time.Tick(time.Minute):
log.Debug("up and running")
}