fixed errors

This commit is contained in:
Annika Hannig 2021-10-27 18:01:13 +00:00
parent 330047fac1
commit b4aed3496c
No known key found for this signature in database
GPG Key ID: 62E226E47DDCE58D
3 changed files with 11 additions and 12 deletions

View File

@ -32,7 +32,7 @@ var banner = []string{
func printBanner(
cfg *config.Config,
neigborsStore *store.NeighborsStore,
neighborsStore *store.NeighborsStore,
routesStore *store.RoutesStore,
) {
status, _ := http.CollectAppStatus(routesStore, neighborsStore)

View File

@ -23,23 +23,23 @@ func main() {
flag.Parse()
// Load configuration
cfg, err = config.LoadConfig(filename)
cfg, err := config.LoadConfig(*configFilenameFlag)
if err != nil {
log.Fatal(err)
}
// Say hi
printBanner(cfg)
log.Println("Using configuration:", cfg.File)
// Setup local routes store
neighborsStore := store.NewNeighborsStore(cfg)
routesStore := store.NewRoutesStore(cfg)
routesStore := store.NewRoutesStore(neighborsStore, cfg)
// Say hi
printBanner(cfg, neighborsStore, routesStore)
log.Println("Using configuration:", cfg.File)
// Start stores
if config.EnablePrefixLookup == true {
go neighborsStore.Start(ctx)
go routesStore.Start(ctx)
if cfg.Server.EnablePrefixLookup == true {
go neighborsStore.Start()
go routesStore.Start()
}
// Start the Housekeeping

View File

@ -1,7 +1,6 @@
package store
import (
"context"
"log"
"strings"
"sync"
@ -66,7 +65,7 @@ func NewRoutesStore(
}
// Start starts the routes store
func (rs *RoutesStore) Start(ctx context.Context) {
func (rs *RoutesStore) Start() {
log.Println("Starting local routes store")
log.Println("Routes Store refresh interval set to:", rs.refreshInterval)
if err := rs.init(); err != nil {