Documentation ¶
Index ¶
- type AntiFlood
- func (af *AntiFlood) CanProcessMessage(_ p2p.MessageP2P, _ p2p.PeerID) error
- func (af *AntiFlood) CanProcessMessagesOnTopic(_ p2p.PeerID, _ string, _ uint32) error
- func (af *AntiFlood) IsInterfaceNil() bool
- func (af *AntiFlood) ResetForTopic(_ string)
- func (af *AntiFlood) SetMaxMessagesForTopic(_ string, _ uint32)
- type BlacklistHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AntiFlood ¶
type AntiFlood struct { }
AntiFlood is a mock implementation of the antiflood interface
func (*AntiFlood) CanProcessMessage ¶
CanProcessMessage will always return nil
func (*AntiFlood) CanProcessMessagesOnTopic ¶
CanProcessMessagesOnTopic will always return nil
func (*AntiFlood) IsInterfaceNil ¶
IsInterfaceNil return true if there is no value under the interface
func (*AntiFlood) ResetForTopic ¶
ResetForTopic won't do anything
func (*AntiFlood) SetMaxMessagesForTopic ¶
SetMaxMessagesForTopic won't do anything
type BlacklistHandler ¶
type BlacklistHandler struct { }
BlacklistHandler is a mock implementation of BlacklistHandler that does not manage black listed keys (all keys [peers] are whitelisted)
func (*BlacklistHandler) AddWithSpan ¶
func (dbh *BlacklistHandler) AddWithSpan(_ string, _ time.Duration) error
AddWithSpan does nothing
func (*BlacklistHandler) Has ¶
func (dbh *BlacklistHandler) Has(_ string) bool
Has outputs false (all peers are white listed)
func (*BlacklistHandler) IsInterfaceNil ¶
func (dbh *BlacklistHandler) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
Click to show internal directories.
Click to hide internal directories.