domain

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 6 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)) context.CancelFunc

func (*DomainImpl) Close

func (d *DomainImpl) Close()

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