Ask Bjørn Hansen 96afb77844 database: create shared database package with configurable patterns
Extract ~200 lines of duplicate database connection code from api/ntpdb/
and monitor/ntpdb/ into common/database/ package. Creates foundation for
database consolidation while maintaining zero breaking changes.

Files added:
- config.go: Unified configuration with package-specific defaults
- connector.go: Dynamic connector pattern from Boostport
- pool.go: Configurable connection pool management
- metrics.go: Optional Prometheus metrics integration
- interfaces.go: Shared database interfaces for consistent patterns

Key features:
- Configuration-driven approach (API: 25/10 connections + metrics,
  Monitor: 10/5 connections, no metrics)
- Optional Prometheus metrics when registerer provided
- Backward compatibility via convenience functions
- Flexible config file loading (explicit paths + search-based)

Dependencies: Added mysql driver and yaml parsing for database configuration.
2025-07-12 16:54:24 -07:00
2025-06-06 19:50:30 -07:00
2025-06-06 19:16:14 -07:00
2025-06-06 19:08:16 -07:00
2024-01-20 11:48:32 -07:00
2025-06-06 19:56:43 -07:00

Common library for the NTP Pool project with shared infrastructure components.

Packages

  • apitls - TLS setup for NTP Pool internal services with embedded CA
  • config - NTP Pool project configuration with environment variables
  • ekko - Enhanced Echo web framework with observability middleware
  • health - Standalone health check HTTP server
  • kafka - Kafka client wrapper with TLS support
  • logger - Structured logging with OpenTelemetry integration
  • metricsserver - Prometheus metrics HTTP server
  • timeutil - JSON-serializable duration types
  • tracing - OpenTelemetry distributed tracing setup
  • types - Shared data structures for NTP Pool
  • ulid - Thread-safe ULID generation
  • version - Build metadata and version information
  • xff/fastlyxff - Fastly CDN IP range management

Go Reference

Description
No description provided
Readme BSD-3-Clause 271 KiB
Languages
Go 98.7%
Shell 1.2%
Makefile 0.1%