Versions in this module Expand all Collapse all v0 v0.0.5 Mar 4, 2019 Changes in this version + const BucketSize + type Bucket struct + func NewBucket() *Bucket + type Framework struct + func New(addressValidator func(common.Address) bool, privKey *ecdsa.PrivateKey) *Framework + func (f *Framework) Address() common.Address + func (f *Framework) Bootstrap() + func (f *Framework) Configure(l *network.Legion) error + func (f *Framework) NewMessage(ctx *network.MessageContext) + func (f *Framework) PeerDisconnect(ctx *network.PeerContext) + func (f *Framework) RecieveMessageChan() chan *IncomingMessage + func (f *Framework) SendMessage(recipient common.Address, messageType string, body proto.Message) error + func (f *Framework) ValidateMessage(ctx *network.MessageContext) bool + type ID protobuf.ID + func CreateID(address common.Address, networkAddr string) ID + func (id ID) AddressHex() string + func (id ID) Equals(other ID) bool + func (id ID) EthereumAddress() common.Address + func (id ID) Less(other interface{}) bool + func (id ID) PrefixLen() int + func (id ID) String() string + func (id ID) Xor(other ID) ID + type IncomingMessage struct + Body proto.Message + Sender *protobuf.ID + Type string + type RoutingTable struct + func CreateRoutingTable(self ID) *RoutingTable + func (t *RoutingTable) Bucket(id int) *Bucket + func (t *RoutingTable) FindClosestPeers(target ID, count int) (peers []ID) + func (t *RoutingTable) GetPeerAddresses() (peers []string) + func (t *RoutingTable) GetPeers() (peers []ID) + func (t *RoutingTable) PeerExists(target ID) bool + func (t *RoutingTable) RemovePeer(target ID) bool + func (t *RoutingTable) Self() []byte + func (t *RoutingTable) Update(target ID)