Documentation
¶
Index ¶
Constants ¶
View Source
const (
// Sentinal value
BucketNotCalculated = -1
)
Variables ¶
This section is empty.
Functions ¶
func BalancePacket ¶
For this function to work correctly it requires that the buckets for the gateways have been calculated If the contract is violated balancing will not work properly and the second return value will return false
func CalculateBucketsForGateways ¶
func CalculateBucketsForGateways(gateways []Gateway)
Implements Hash-Threshold mapping, equivalent to the implementation in the linux kernel. After this function returns each gateway will have a positive bucketUpperBound with a maximum value of 2147483647 (INT_MAX)
Types ¶
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
func (*Gateway) BucketUpperBound ¶
Click to show internal directories.
Click to hide internal directories.