Documentation
¶
Index ¶
- func EscapeFilePath(path string) string
- func IsEmpty(dir string) bool
- func IsPrivateSubnet(ip net.IP) bool
- func LocalAddresses() ([]string, error)
- func NewID(input []byte) uint64
- func ParseFQDN(anyURL string) (string, error)
- func PreferredIPv4() net.IP
- func PreferredIPv6() net.IP
- func SerialNumber() (*big.Int, error)
- type LeakyBucket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EscapeFilePath ¶
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.