Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPrivateSubnet ¶
Returns true if the provided IP falls within a private address range
func LocalAddresses ¶
Parses a list of usable local IP addresses
func PreferredIPv4 ¶
Performs a logical UDP connection to an endpoint that does not need to exist and returns the local IP address that was used to perform the connection.
func PreferredIPv6 ¶
Performs a logical UDP connection to an endpoint that does not need to exist and returns the local IP address that was used to perform the connection.
func SerialNumber ¶
Types ¶
type LeakyBucket ¶
type LeakyBucket struct {
// contains filtered or unexported fields
}
func NewLeakyBucket ¶
func NewLeakyBucket(capacity int, window time.Duration) *LeakyBucket
Creates a new rate limiter using the leaky bucket algorithm
func (*LeakyBucket) AllowRequest ¶
func (b *LeakyBucket) AllowRequest() bool
Click to show internal directories.
Click to hide internal directories.