Files
beacon-server/internal/api/routes.go
T
Enot (ded) Skelly 65cb8c9d61 add routes api
any route observer where all hops are high confidence
are now stored and available at /routes

you can also search for a src dest route and it will
return any recored route subset that can link the src
and dest hash
2026-06-05 15:57:08 -07:00

22 lines
731 B
Go

package api
import "github.com/google/uuid"
// RouteHop is a single resolved hop in a known route.
type RouteHop struct {
NodeID uuid.UUID `json:"nodeId"`
HashBytes string `json:"hashBytes"` // hex-encoded hash prefix
Node *ResolvedNode `json:"node,omitempty"` // populated when node details are available
}
// KnownRoute is a fully resolved path through the mesh where all hops
// have been confirmed as high confidence.
type KnownRoute struct {
ID int64 `json:"id"`
IATA string `json:"iata"`
HopCount int32 `json:"hopCount"`
Hops []RouteHop `json:"hops"`
FirstSeen int64 `json:"firstSeen"` // epoch ms
LastSeen int64 `json:"lastSeen"` // epoch ms
}