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

@@ -58,7 +58,10 @@ type RISLiveMessage struct {
Data RISMessage `json:"data"`
}
// RISMessage represents a message from the RIS Live stream
// RISMessage represents a BGP update message from the RIPE RIS Live stream.
// It contains metadata about the BGP session (peer, ASN, host) along with
// the actual BGP update data including AS path, communities, announcements,
// and withdrawals.
type RISMessage struct {
Type string `json:"type"`
Timestamp float64 `json:"timestamp"`
@@ -80,7 +83,9 @@ type RISMessage struct {
Raw string `json:"raw,omitempty"`
}
// RISAnnouncement represents announcement data within a RIS message
// RISAnnouncement represents a BGP route announcement within a RIS message.
// It contains the next hop IP address and the list of prefixes being announced
// via that next hop.
type RISAnnouncement struct {
NextHop string `json:"next_hop"`
Prefixes []string `json:"prefixes"`