Versions in this module Expand all Collapse all v1 v1.1.0 Jun 19, 2022 Changes in this version + func NewThrottledListener(listener net.Listener, maxConnsPerSec float64) net.Listener + type BandwidthThrottler interface + Acquire func(msgSize uint64, nodeID ids.ShortID) + AddNode func(nodeID ids.ShortID) + RemoveNode func(nodeID ids.ShortID) + func NewBandwidthThrottler(log logging.Logger, namespace string, registerer prometheus.Registerer, ...) (BandwidthThrottler, error) + type BandwidthThrottlerConfig struct + MaxBurstSize uint64 + RefillRate uint64 + type DialThrottler interface + Acquire func(ctx context.Context) error + func NewDialThrottler(throttleLimit int) DialThrottler + func NewNoDialThrottler() DialThrottler + type InboundConnUpgradeThrottler interface + Dispatch func() + ShouldUpgrade func(ip utils.IPDesc) bool + Stop func() + func NewInboundConnUpgradeThrottler(log logging.Logger, config InboundConnUpgradeThrottlerConfig) InboundConnUpgradeThrottler + type InboundConnUpgradeThrottlerConfig struct + MaxRecentConnsUpgraded int + UpgradeCooldown time.Duration + type InboundMsgThrottler interface + Acquire func(msgSize uint64, nodeID ids.ShortID) + Release func(msgSize uint64, nodeID ids.ShortID) + func NewInboundMsgThrottler(log logging.Logger, namespace string, registerer prometheus.Registerer, ...) (InboundMsgThrottler, error) + func NewNoInboundThrottler() InboundMsgThrottler + type InboundMsgThrottlerConfig struct + MaxProcessingMsgsPerNode uint64 + type MsgByteThrottlerConfig struct + AtLargeAllocSize uint64 + NodeMaxAtLargeBytes uint64 + VdrAllocSize uint64 + type OutboundMsgThrottler interface + Acquire func(msg message.OutboundMessage, nodeID ids.ShortID) bool + Release func(msg message.OutboundMessage, nodeID ids.ShortID) + func NewNoOutboundThrottler() OutboundMsgThrottler + func NewSybilOutboundMsgThrottler(log logging.Logger, namespace string, registerer prometheus.Registerer, ...) (OutboundMsgThrottler, error)