domain

package
v0.6.1-alpha.19 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 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