Documentation ¶
Overview ¶
Package discover implements the node discovery protocol.
Index ¶
Constants ¶
View Source
const ( AnnouncementMagicV2 = 0x029E4C77 QueryMagicV2 = 0x23D63A9A )
View Source
const (
AnnouncementPort = 21025
)
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 AnnounceV2 ¶ added in v0.6.0
func (AnnounceV2) EncodeXDR ¶ added in v0.6.0
func (o AnnounceV2) EncodeXDR(w io.Writer) (int, error)
func (AnnounceV2) MarshalXDR ¶ added in v0.6.0
func (o AnnounceV2) MarshalXDR() []byte
func (*AnnounceV2) UnmarshalXDR ¶ added in v0.6.0
func (o *AnnounceV2) UnmarshalXDR(bs []byte) error
type Discoverer ¶
type Discoverer struct {
// contains filtered or unexported fields
}
func NewDiscoverer ¶
func NewDiscoverer(id string, addresses []string) (*Discoverer, error)
func (*Discoverer) ExtAnnounceOK ¶ added in v0.8.1
func (d *Discoverer) ExtAnnounceOK() bool
func (*Discoverer) Lookup ¶
func (d *Discoverer) Lookup(node string) []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 QueryV2 ¶ added in v0.6.0
func (QueryV2) MarshalXDR ¶ added in v0.6.0
func (*QueryV2) UnmarshalXDR ¶ added in v0.6.0
Click to show internal directories.
Click to hide internal directories.