Documentation ¶
Overview ¶
network announcements
Index ¶
- Constants
- func AddPeer(publicKey []byte, listeners []byte, timestamp uint64) bool
- func AddRPC(fingerprint []byte, rpcs []byte, timestamp uint64) bool
- func Finalise() error
- func GetNext(publicKey []byte) ([]byte, []byte, time.Time, error)
- func GetRandom(publicKey []byte) ([]byte, []byte, time.Time, error)
- func Initialise(nodesDomain, peerFile string) error
- func SendRegistration(client *zmqutil.Client, fn string) error
- func SetPeer(publicKey []byte, listeners []byte) error
- func SetRPC(fingerprint fingerprintType, rpcs []byte) error
- type PeerItem
- type PeerList
- type RPCEntry
Constants ¶
View Source
const ( TypeRPC = iota TypePeer = iota )
type of listener
Variables ¶
This section is empty.
Functions ¶
func 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
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 GetRandom ¶ added in v0.8.1
fetch the data for the random node in the ring not matching a given public key
func Initialise ¶
initialise 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
send a peer registration request to a client channel
Types ¶
type PeerItem ¶ added in v0.5.7
PeerItem is the basic structure for backup and restore peers
func NewPeerItem ¶ added in v0.5.7
func NewPeerItem(peer *peerEntry) *PeerItem
NewPeerItem is to create a PeerItem from peerEntry
func (PeerItem) MarshalText ¶ added in v0.5.7
MarshalText is the json marshal function for PeerItem
func (*PeerItem) UnmarshalText ¶ added in v0.5.7
UnmarshalText is the json unmarshal function for PeerItem
Source Files ¶
Click to show internal directories.
Click to hide internal directories.