Documentation ¶
Index ¶
- func NewNilTopicFloodPreventer() *nilTopicFloodPreventer
- type AntiFlood
- func (af *AntiFlood) ApplyConsensusSize(_ int)
- func (af *AntiFlood) BlacklistPeer(_ core.PeerID, _ string, _ time.Duration)
- func (af *AntiFlood) CanProcessMessage(_ p2p.MessageP2P, _ core.PeerID) error
- func (af *AntiFlood) CanProcessMessagesOnTopic(_ core.PeerID, _ string, _ uint32, _ uint64, _ []byte) error
- func (af *AntiFlood) Close() error
- func (af *AntiFlood) IsInterfaceNil() bool
- func (af *AntiFlood) IsOriginatorEligibleForTopic(_ core.PeerID, _ string) error
- func (af *AntiFlood) ResetForTopic(_ string)
- func (af *AntiFlood) SetDebugger(_ process.AntifloodDebugger) error
- func (af *AntiFlood) SetMaxMessagesForTopic(_ string, _ uint32)
- func (af *AntiFlood) SetPeerValidatorMapper(_ process.PeerValidatorMapper) error
- func (af *AntiFlood) SetTopicsForAll(_ ...string)
- type AntifloodDebugger
- type PeerBlacklistCacher
- type PeerValidatorMapper
- type TimeCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNilTopicFloodPreventer ¶ added in v1.0.127
func NewNilTopicFloodPreventer() *nilTopicFloodPreventer
NewNilTopicFloodPreventer returns a new instance of nilTopicFloodPreventer
Types ¶
type AntiFlood ¶
type AntiFlood struct { }
AntiFlood is a mock implementation of the antiflood interface
func (*AntiFlood) ApplyConsensusSize ¶ added in v1.0.123
ApplyConsensusSize does nothing
func (*AntiFlood) BlacklistPeer ¶ added in v1.0.132
BlacklistPeer does nothing
func (*AntiFlood) CanProcessMessage ¶
CanProcessMessage will always return nil
func (*AntiFlood) CanProcessMessagesOnTopic ¶
func (af *AntiFlood) CanProcessMessagesOnTopic(_ core.PeerID, _ string, _ uint32, _ uint64, _ []byte) error
CanProcessMessagesOnTopic will always return nil
func (*AntiFlood) IsInterfaceNil ¶
IsInterfaceNil return true if there is no value under the interface
func (*AntiFlood) IsOriginatorEligibleForTopic ¶ added in v1.0.133
IsOriginatorEligibleForTopic will always return nil
func (*AntiFlood) ResetForTopic ¶
ResetForTopic won't do anything
func (*AntiFlood) SetDebugger ¶ added in v1.0.127
func (af *AntiFlood) SetDebugger(_ process.AntifloodDebugger) error
SetDebugger returns nil
func (*AntiFlood) SetMaxMessagesForTopic ¶
SetMaxMessagesForTopic won't do anything
func (*AntiFlood) SetPeerValidatorMapper ¶ added in v1.0.133
func (af *AntiFlood) SetPeerValidatorMapper(_ process.PeerValidatorMapper) error
SetPeerValidatorMapper does nothing
func (*AntiFlood) SetTopicsForAll ¶ added in v1.0.133
SetTopicsForAll does nothing
type AntifloodDebugger ¶ added in v1.0.127
type AntifloodDebugger struct { }
AntifloodDebugger is a disabled instance of the antoiflood debugger
func (*AntifloodDebugger) Close ¶ added in v1.0.127
func (ad *AntifloodDebugger) Close() error
Close returns nil
func (*AntifloodDebugger) IsInterfaceNil ¶ added in v1.0.127
func (ad *AntifloodDebugger) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type PeerBlacklistCacher ¶ added in v1.0.133
type PeerBlacklistCacher struct { }
PeerBlacklistCacher is a mock implementation of PeerBlacklistHandler that does not manage black listed keys (all keys [peers] are whitelisted)
func (*PeerBlacklistCacher) Has ¶ added in v1.0.133
func (pbc *PeerBlacklistCacher) Has(_ core.PeerID) bool
Has outputs false (all peers are white listed)
func (*PeerBlacklistCacher) IsInterfaceNil ¶ added in v1.0.133
func (pbc *PeerBlacklistCacher) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PeerBlacklistCacher) Sweep ¶ added in v1.0.133
func (pbc *PeerBlacklistCacher) Sweep()
Sweep does nothing
type PeerValidatorMapper ¶ added in v1.0.133
type PeerValidatorMapper struct { }
PeerValidatorMapper is a disabled validator mapper
func (*PeerValidatorMapper) GetPeerInfo ¶ added in v1.0.133
func (p *PeerValidatorMapper) GetPeerInfo(_ core.PeerID) core.P2PPeerInfo
GetPeerInfo returns validator type for all peers
func (*PeerValidatorMapper) IsInterfaceNil ¶ added in v1.0.133
func (p *PeerValidatorMapper) IsInterfaceNil() bool
IsInterfaceNil returns true if underlying object is nil
type TimeCache ¶ added in v1.0.133
type TimeCache struct { }
TimeCache is a mock implementation of TimeCacher
func (*TimeCache) IsInterfaceNil ¶ added in v1.0.133
IsInterfaceNil returns true if there is no value under the interface