fixed errors
This commit is contained in:
parent
330047fac1
commit
b4aed3496c
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user