Documentation ¶
Index ¶
Constants ¶
View Source
const ( AnnouncementMagicV1 = 0x20121025 QueryMagicV1 = 0x19760309 )
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 AnnounceV1 ¶ added in v0.6.0
func (AnnounceV1) EncodeXDR ¶ added in v0.6.0
func (o AnnounceV1) EncodeXDR(w io.Writer) (int, error)
func (AnnounceV1) MarshalXDR ¶ added in v0.6.0
func (o AnnounceV1) MarshalXDR() []byte
func (*AnnounceV1) UnmarshalXDR ¶ added in v0.6.0
func (o *AnnounceV1) UnmarshalXDR(bs []byte) error
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 { MyID string ListenPort int BroadcastIntv time.Duration ExtBroadcastIntv time.Duration // contains filtered or unexported fields }
func NewDiscoverer ¶
func NewDiscoverer(id string, port int, extServer string) (*Discoverer, error)
func (*Discoverer) Lookup ¶
func (d *Discoverer) Lookup(node string) []string
type QueryV1 ¶ added in v0.6.0
func (QueryV1) MarshalXDR ¶ added in v0.6.0
func (*QueryV1) UnmarshalXDR ¶ added in v0.6.0
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.