Add database file size and reorganize status page
- Add database file size tracking to Stats struct and GetStats() - Move routing table metrics to separate 'Routing Table' status box - Add IPv4/IPv6 updates per second to routing table metrics - Database box now shows: ASNs, prefixes, peerings, and database size - Routing table box shows: live routes, IPv4/IPv6 counts, and update rates
This commit is contained in:
@@ -6,14 +6,21 @@ import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"go.uber.org/fx"
|
||||
)
|
||||
|
||||
const (
|
||||
// shutdownTimeout is the maximum time allowed for graceful shutdown
|
||||
shutdownTimeout = 60 * time.Second
|
||||
)
|
||||
|
||||
// CLIEntry is the main entry point for the CLI
|
||||
func CLIEntry() {
|
||||
app := fx.New(
|
||||
getModule(),
|
||||
fx.StopTimeout(shutdownTimeout), // Allow 60 seconds for graceful shutdown
|
||||
fx.Invoke(func(lc fx.Lifecycle, rw *RouteWatch, logger *slog.Logger) {
|
||||
lc.Append(fx.Hook{
|
||||
OnStart: func(_ context.Context) error {
|
||||
|
||||
Reference in New Issue
Block a user