announce

package
v0.4.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2017 License: ISC Imports: 17 Imported by: 0

Documentation

Overview

network announcements

Index

Constants

View Source
const (
	TypeRPC  = iota
	TypePeer = iota
)

type of listener

Variables

This section is empty.

Functions

func AddPeer

func AddPeer(publicKey []byte, broadcasts []byte, listeners []byte) bool

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

func AddRPC(fingerprint []byte, rpcs []byte) bool

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 Finalise

func Finalise() error

finialise - stop all background tasks

func GetNext added in v0.2.0

func GetNext(publicKey []byte) ([]byte, []byte, []byte, error)

fetch the data for the next node in the ring for a given public key

func Initialise

func Initialise(nodesDomain string) error

initialise the announcement system pass a fuklly qualified domain for root node list or empty string for no root nodes

func SendRegistration added in v0.2.0

func SendRegistration(client *zmqutil.Client, fn string) error

send a peer registration request to a client channel

func SetPeer added in v0.2.0

func SetPeer(publicKey []byte, broadcasts []byte, listeners []byte) error

called by the peering initialisation to set up this node's announcement data

func SetRPC added in v0.2.0

func SetRPC(fingerprint fingerprintType, rpcs []byte) error

set this node's rpc announcement data

Types

type RPCEntry added in v0.2.0

type RPCEntry struct {
	Fingerprint fingerprintType    `json:"fingerprint"`
	Connections []*util.Connection `json:"connections"`
}

type of returned data

func FetchRPCs added in v0.2.0

func FetchRPCs(start uint64, count int) ([]RPCEntry, uint64, error)

fetch some records

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL