Documentation ¶
Index ¶
- type BehaviourImpl
- func (a *BehaviourImpl) ActiveConnections() *utils.Addr2Peers
- func (a *BehaviourImpl) Address(ctx context.Context, addr string)
- func (a *BehaviourImpl) AskAboutKnownPeers()
- func (a *BehaviourImpl) Counter() *utils.Counter
- func (a *BehaviourImpl) IncomeConnection(ctx context.Context, c net.Conn)
- func (a *BehaviourImpl) InfoMessage(info peer.InfoMessage)
- func (a *BehaviourImpl) KnownPeers() *utils.KnownPeers
- func (a *BehaviourImpl) ProtoMessage(incomeMessage peer.ProtoMessage)
- func (a *BehaviourImpl) SendAllMyKnownPeers()
- func (a *BehaviourImpl) SpawnKnownPeers(ctx context.Context)
- func (a *BehaviourImpl) SpawnedPeers() *utils.SpawnedPeers
- func (a *BehaviourImpl) Stop()
- type PeerOutgoingSpawnerImpl
- type PeerSpawner
- type Retransmitter
- type TransactionList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BehaviourImpl ¶
type BehaviourImpl struct {
// contains filtered or unexported fields
}
func NewBehaviour ¶
func NewBehaviour(knownPeers *utils.KnownPeers, peerSpawner PeerSpawner, scheme proto.Scheme) *BehaviourImpl
func (*BehaviourImpl) ActiveConnections ¶
func (a *BehaviourImpl) ActiveConnections() *utils.Addr2Peers
func (*BehaviourImpl) AskAboutKnownPeers ¶
func (a *BehaviourImpl) AskAboutKnownPeers()
func (*BehaviourImpl) Counter ¶
func (a *BehaviourImpl) Counter() *utils.Counter
func (*BehaviourImpl) IncomeConnection ¶
func (a *BehaviourImpl) IncomeConnection(ctx context.Context, c net.Conn)
func (*BehaviourImpl) InfoMessage ¶
func (a *BehaviourImpl) InfoMessage(info peer.InfoMessage)
func (*BehaviourImpl) KnownPeers ¶
func (a *BehaviourImpl) KnownPeers() *utils.KnownPeers
func (*BehaviourImpl) ProtoMessage ¶
func (a *BehaviourImpl) ProtoMessage(incomeMessage peer.ProtoMessage)
func (*BehaviourImpl) SendAllMyKnownPeers ¶
func (a *BehaviourImpl) SendAllMyKnownPeers()
func (*BehaviourImpl) SpawnKnownPeers ¶
func (a *BehaviourImpl) SpawnKnownPeers(ctx context.Context)
func (*BehaviourImpl) SpawnedPeers ¶
func (a *BehaviourImpl) SpawnedPeers() *utils.SpawnedPeers
func (*BehaviourImpl) Stop ¶
func (a *BehaviourImpl) Stop()
type PeerOutgoingSpawnerImpl ¶
type PeerOutgoingSpawnerImpl struct {
// contains filtered or unexported fields
}
func NewPeerSpawner ¶
func NewPeerSpawner(pool bytespool.Pool, skipFunc conn.SkipFilter, parent peer.Parent, WavesNetwork string, declAddr proto.TCPAddr) *PeerOutgoingSpawnerImpl
func (*PeerOutgoingSpawnerImpl) SpawnIncoming ¶
func (a *PeerOutgoingSpawnerImpl) SpawnIncoming(ctx context.Context, c net.Conn)
func (*PeerOutgoingSpawnerImpl) SpawnOutgoing ¶
func (a *PeerOutgoingSpawnerImpl) SpawnOutgoing(ctx context.Context, address string)
type PeerSpawner ¶
type Retransmitter ¶
type Retransmitter struct {
// contains filtered or unexported fields
}
Base struct that makes transaction transmit
func NewRetransmitter ¶
func NewRetransmitter(behaviour *BehaviourImpl, parent peer.Parent) *Retransmitter
creates new Retransmitter
func (*Retransmitter) Run ¶
func (a *Retransmitter) Run(ctx context.Context)
this function starts main process of transaction transmitting
func (*Retransmitter) ServeIncomingConnections ¶
func (a *Retransmitter) ServeIncomingConnections(ctx context.Context, listenAddr string) error
listen incoming connections on provided address
type TransactionList ¶
type TransactionList struct {
// contains filtered or unexported fields
}
transactions cache
func NewTransactionList ¶
func NewTransactionList(size int, scheme proto.Scheme) *TransactionList
func (*TransactionList) Add ¶
func (a *TransactionList) Add(transaction proto.Transaction)
func (*TransactionList) Exists ¶
func (a *TransactionList) Exists(transaction proto.Transaction) bool
func (*TransactionList) Len ¶
func (a *TransactionList) Len() int
Click to show internal directories.
Click to hide internal directories.