Documentation ¶
Index ¶
Constants ¶
View Source
const WildcardCharacter = "*"
WildcardCharacter is the character string used to specify that the topic refers to a
Variables ¶
This section is empty.
Functions ¶
func NewNilTopicFloodPreventer ¶
func NewNilTopicFloodPreventer() *nilTopicFloodPreventer
NewNilTopicFloodPreventer returns a new instance of nilTopicFloodPreventer
func NewQuotaFloodPreventer ¶
func NewQuotaFloodPreventer(arg ArgQuotaFloodPreventer) (*quotaFloodPreventer, error)
NewQuotaFloodPreventer creates a new flood preventer based on quota / peer
func NewTopicFloodPreventer ¶
NewTopicFloodPreventer creates a new flood preventer based on topic
Types ¶
type ArgQuotaFloodPreventer ¶ added in v1.0.123
type ArgQuotaFloodPreventer struct { Name string Cacher storage.Cacher StatusHandlers []QuotaStatusHandler BaseMaxNumMessagesPerPeer uint32 MaxTotalSizePerPeer uint64 PercentReserved float32 IncreaseThreshold uint32 IncreaseFactor float32 }
ArgQuotaFloodPreventer defines the arguments for a quota flood preventer
type QuotaStatusHandler ¶
type QuotaStatusHandler interface { ResetStatistics() AddQuota(identifier string, 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.