Add godoc documentation and README with code structure

Add comprehensive godoc comments to all exported types, functions,
and constants throughout the codebase. Create README.md documenting
the project architecture, execution flow, database schema, and
component relationships.
This commit is contained in:
2025-12-27 12:30:46 +07:00
parent 23dcdd800b
commit 95bbb655ab
8 changed files with 299 additions and 35 deletions

View File

@@ -115,16 +115,24 @@ func (t *Tracker) GetRouteMetrics() RouteMetrics {
// StreamMetrics contains streaming statistics
type StreamMetrics struct {
TotalMessages uint64
TotalBytes uint64
// TotalMessages is the total number of messages received since startup
TotalMessages uint64
// TotalBytes is the total number of bytes received since startup
TotalBytes uint64
// ConnectedSince is the time when the current connection was established
ConnectedSince time.Time
Connected bool
// Connected indicates whether the stream is currently connected
Connected bool
// MessagesPerSec is the rate of messages received per second (1-minute average)
MessagesPerSec float64
BitsPerSec float64
// BitsPerSec is the rate of bits received per second (1-minute average)
BitsPerSec float64
}
// RouteMetrics contains route update statistics
type RouteMetrics struct {
// IPv4UpdatesPerSec is the rate of IPv4 route updates per second (1-minute average)
IPv4UpdatesPerSec float64
// IPv6UpdatesPerSec is the rate of IPv6 route updates per second (1-minute average)
IPv6UpdatesPerSec float64
}