mirror of
https://github.com/alice-lg/alice-lg.git
synced 2024-05-11 05:55:03 +00:00
23 lines
505 B
Go
23 lines
505 B
Go
package backend
|
|
|
|
// Globals
|
|
var (
|
|
AliceConfig *Config
|
|
AliceRoutesStore *RoutesStore
|
|
AliceNeighboursStore *NeighboursStore
|
|
)
|
|
|
|
// InitConfig loads the configuration into the global
|
|
// AliceConfig
|
|
func InitConfig(filename string) error {
|
|
var err error
|
|
AliceConfig, err = loadConfig(filename)
|
|
return err
|
|
}
|
|
|
|
// InitStores initializes the routes and neighbors cache
|
|
func InitStores() {
|
|
AliceNeighboursStore = NewNeighboursStore(AliceConfig)
|
|
AliceRoutesStore = NewRoutesStore(AliceConfig)
|
|
}
|