Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQuotaFloodPreventer ¶ added in v1.0.66
func NewQuotaFloodPreventer( cacher storage.Cacher, statusHandler QuotaStatusHandler, maxMessagesPerPeer uint32, maxTotalSizePerPeer uint64, maxMessages uint32, maxTotalSize uint64, ) (*quotaFloodPreventer, error)
NewQuotaFloodPreventer creates a new flood preventer based on quota / peer
Types ¶
type QuotaStatusHandler ¶ added in v1.0.66
type QuotaStatusHandler interface { ResetStatistics() AddQuota(identifier string, numReceived uint32, sizeReceived uint64, numProcessed uint32, sizeProcessed uint64) SetGlobalQuota(numReceived uint32, sizeReceived uint64, numProcessed uint32, sizeProcessed uint64) IsInterfaceNil() bool }
QuotaStatusHandler defines the behavior of a quota handler able to process periodic updates of peers quota measured by the system
Click to show internal directories.
Click to hide internal directories.