Documentation ¶
Overview ¶
Package discover implements the node discovery protocol.
Index ¶
- Constants
- Variables
- type Address
- type Announce
- type Discoverer
- func (d *Discoverer) All() map[protocol.NodeID][]string
- func (d *Discoverer) ExtAnnounceOK() bool
- func (d *Discoverer) Hint(node string, addrs []string)
- func (d *Discoverer) Lookup(node protocol.NodeID) []string
- func (d *Discoverer) StartGlobal(server string, extPort uint16)
- func (d *Discoverer) StartLocal()
- type Node
- type Query
Constants ¶
View Source
const ( AnnouncementMagic = 0x9D79BC39 QueryMagic = 0x2CA856F5 )
Variables ¶
View Source
var (
ErrIncorrectMagic = errors.New("incorrect magic number")
)
Functions ¶
This section is empty.
Types ¶
type Address ¶ added in v0.6.0
func (Address) MarshalXDR ¶ added in v0.6.0
func (*Address) UnmarshalXDR ¶ added in v0.6.0
type Announce ¶ added in v0.9.0
func (Announce) MarshalXDR ¶ added in v0.9.0
func (*Announce) UnmarshalXDR ¶ added in v0.9.0
type Discoverer ¶
type Discoverer struct {
// contains filtered or unexported fields
}
func NewDiscoverer ¶
func (*Discoverer) ExtAnnounceOK ¶ added in v0.8.1
func (d *Discoverer) ExtAnnounceOK() bool
func (*Discoverer) Hint ¶ added in v0.8.6
func (d *Discoverer) Hint(node string, addrs []string)
func (*Discoverer) StartGlobal ¶ added in v0.8.1
func (d *Discoverer) StartGlobal(server string, extPort uint16)
func (*Discoverer) StartLocal ¶ added in v0.8.1
func (d *Discoverer) StartLocal()
type Node ¶ added in v0.8.6
func (Node) MarshalXDR ¶ added in v0.8.6
func (*Node) UnmarshalXDR ¶ added in v0.8.6
type Query ¶ added in v0.9.0
func (Query) MarshalXDR ¶ added in v0.9.0
func (*Query) UnmarshalXDR ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.