Documentation ¶
Overview ¶
Package announce - network announcements
The DNS TXT record format is a set of space separated key=value pairs
Key Value ======= ========= bitmark v3 a Public IP addresses as IPv4;[IPv6] c Peer-To-Peer port number (decimal) r RPC port number (decimal) f SHA3 fingerprint of the certificate used by RPC connection for TLS verification (hex) p Public key of the P2P connection for ZeroMQ encryption (hex)
Index ¶
- func AddPeer(publicKey []byte, listeners []byte, timestamp uint64) bool
- func AddRPC(fin []byte, listeners []byte, timestamp uint64) bool
- func FetchRPCs(start uint64, count int) ([]rpc.Entry, uint64, error)
- func Finalise() error
- func GetNext(publicKey []byte) ([]byte, []byte, time.Time, error)
- func GetRandom(publicKey []byte) ([]byte, []byte, time.Time, error)
- func Initialise(domainName, cacheDirectory string, f func(string) ([]string, error)) error
- func SendRegistration(client zmqutil.Client, fn string) error
- func SetRPC(fin fingerprint.Fingerprint, listeners []byte) error
- func SetSelf(publicKey []byte, listeners []byte) error
- type Announce
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPeer ¶
AddPeer - add a peer announcement to the in-memory tree returns:
true if this was a new/updated entry false if the update was within the limits (to prevent continuous relaying)
func AddRPC ¶ added in v0.2.0
AddRPC - add an remote RPC listener returns:
true if this was a new/updated entry false if the update was within the limits (to prevent continuous relaying)
func GetNext ¶ added in v0.2.0
GetNext - fetch the data for the next node in the ring for a given public key
func GetRandom ¶ added in v0.8.1
GetRandom - fetch the data for a random node in the ring not matching a given public key
func Initialise ¶
Initialise - set up the announcement system pass a fully qualified domain for root node list or empty string for no root nodes
func SendRegistration ¶ added in v0.2.0
SendRegistration - send a peer registration request to a client channel
func SetRPC ¶ added in v0.2.0
func SetRPC(fin fingerprint.Fingerprint, listeners []byte) error
SetRPC - set this node's rpc announcement data
Types ¶
Click to show internal directories.
Click to hide internal directories.