domain

package
v0.4.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: Apache-2.0, BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainImpl

type DomainImpl struct {
	// contains filtered or unexported fields
}

func NewPeerDomain

func NewPeerDomain(netProvider peering.NetworkProvider, peeringID peering.PeeringID, initialNodes []peering.PeerSender, log *logger.Logger) *DomainImpl

NewPeerDomain creates a collection. Ignores self

func (*DomainImpl) Attach

func (d *DomainImpl) Attach(receiver byte, callback func(recv *peering.PeerMessageIn)) interface{}

func (*DomainImpl) Close

func (d *DomainImpl) Close()

func (*DomainImpl) Detach

func (d *DomainImpl) Detach(attachID interface{})

func (*DomainImpl) GetRandomOtherPeers added in v0.2.4

func (d *DomainImpl) GetRandomOtherPeers(upToNumPeers int) []*cryptolib.PublicKey

func (*DomainImpl) PeerStatus added in v0.2.4

func (d *DomainImpl) PeerStatus() []peering.PeerStatusProvider

func (*DomainImpl) ReshufflePeers

func (d *DomainImpl) ReshufflePeers()

func (*DomainImpl) SendMsgByPubKey added in v0.2.4

func (d *DomainImpl) SendMsgByPubKey(pubKey *cryptolib.PublicKey, msgReceiver, msgType byte, msgData []byte)

func (*DomainImpl) UpdatePeers added in v0.2.4

func (d *DomainImpl) UpdatePeers(newPeerPubKeys []*cryptolib.PublicKey)

Jump to

Keyboard shortcuts

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