- Remove live_routes table from SQL schema and all related indexes - Create new internal/routingtable package with thread-safe RoutingTable - Implement RouteKey-based indexing with secondary indexes for efficient lookups - Add RoutingTableHandler to manage in-memory routes separately from database - Update DatabaseHandler to only handle persistent database operations - Wire up RoutingTable through fx dependency injection - Update server to get live route count from routing table instead of database - Remove LiveRoutes field from database.Stats struct - Update tests to work with new architecture
30 lines
481 B
Makefile
30 lines
481 B
Makefile
export DEBUG = routewatch
|
|
|
|
.PHONY: test fmt lint build clean run asupdate
|
|
|
|
all: test
|
|
|
|
test: lint
|
|
go test -v ./...
|
|
|
|
fmt:
|
|
go fmt ./...
|
|
|
|
lint:
|
|
go vet ./...
|
|
golangci-lint run
|
|
|
|
build:
|
|
CGO_ENABLED=1 go build -o bin/routewatch cmd/routewatch/main.go
|
|
|
|
clean:
|
|
rm -rf bin/
|
|
|
|
run: build
|
|
./bin/routewatch
|
|
|
|
asupdate:
|
|
@echo "Updating AS info data..."
|
|
@go run cmd/asinfo-gen/main.go | gzip > pkg/asinfo/asdata.json.gz.tmp && \
|
|
mv pkg/asinfo/asdata.json.gz.tmp pkg/asinfo/asdata.json.gz
|