Documentation ¶
Overview ¶
Package discovery contains code for peer/neighbor discovery of other DTN nodes through UDP multicast packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalAnnouncements ¶
func MarshalAnnouncements(announcements []Announcement) (data []byte, err error)
MarshalAnnouncements into a CBOR byte string.
Types ¶
type Announcement ¶
type Announcement struct { Type cla.CLAType Endpoint bpv7.EndpointID Port uint }
Announcement of some node's CLA.
func UnmarshalAnnouncements ¶
func UnmarshalAnnouncements(data []byte) (announcements []Announcement, err error)
UnmarshalAnnouncements creates a new array of Announcement based on a CBOR byte string.
func (*Announcement) MarshalCbor ¶
func (announcement *Announcement) MarshalCbor(w io.Writer) error
MarshalCbor creates a CBOR representation for an Announcement.
func (Announcement) String ¶
func (announcement Announcement) String() string
func (*Announcement) UnmarshalCbor ¶
func (announcement *Announcement) UnmarshalCbor(r io.Reader) error
UnmarshalCbor creates an Announcement from its CBOR representation.
type Manager ¶
type Manager struct { NodeId bpv7.EndpointID RegisterFunc func(cla.Convergable) `json:"-"` // contains filtered or unexported fields }
Manager publishes and receives Announcements.
func NewManager ¶
func NewManager( nodeId bpv7.EndpointID, registerFunc func(cla.Convergable), announcements []Announcement, announcementInterval time.Duration, ipv4, ipv6 bool) (*Manager, error)
NewManager for Announcements will be created and started.
Click to show internal directories.
Click to hide internal directories.