Documentation ¶
Overview ¶
Package staticinfo contains the internal representation of the StaticInfoExtension path segment extension, and conversion from and to the corresponding protobuf representation. See also StaticInfoExtension in proto/control_plane/v1/seg_extensions.proto.
Index ¶
Constants ¶
const ( LinkTypeDirect = iota LinkTypeMultihop LinkTypeOpennet )
Variables ¶
This section is empty.
Functions ¶
func ToPB ¶
func ToPB(si *Extension) *cppb.StaticInfoExtension
FromPB creates the protobuf representation for the staticinfo Extension.
Types ¶
type BandwidthInfo ¶
BandwidthInfo is the internal repesentation of `bandwidth` in the StaticInfoExtension.
type Extension ¶
type Extension struct { Latency LatencyInfo Bandwidth BandwidthInfo Geo GeoInfo LinkType LinkTypeInfo InternalHops InternalHopsInfo Note string }
Extension is the internal repesentation of the StaticInfoExtension path segment extension.
func FromPB ¶
func FromPB(pb *cppb.StaticInfoExtension) *Extension
FromPB creates the staticinfo Extension from the protobuf representation.
type GeoCoordinates ¶
GeoCoordinates is the internal repesentation of the GeoCoordinates in the StaticInfoExtension.
type GeoInfo ¶
type GeoInfo map[iface.ID]GeoCoordinates
GeoInfo is the internal repesentation of `geo` in the StaticInfoExtension.
type InternalHopsInfo ¶
InternalHopsInfo is the internal representation of `internal_hops` in the StaticInfoExtension.
type LatencyInfo ¶
LatencyInfo is the internal repesentation of `latency` in the StaticInfoExtension.
type LinkType ¶
type LinkType uint8
LinkType is the internal representation of the LinkType in the StaticInfoExtension. There is no UNSPECIFIED value here, as we can simply omit these from the internal map representation.
type LinkTypeInfo ¶
LinkTypeInfo is the internal representation of `link_type` in the StaticInfoExtension.