Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPublicIP ¶
IsPublicIP ...
tcp/ip协议中,专门保留了三个IP地址区域作为私有地址,其地址范围如下: 10.0.0.0/8:10.0.0.0~10.255.255.255 172.16.0.0/12:172.16.0.0~172.31.255.255 192.168.0.0/16:192.168.0.0~192.168.255.255
func LocalIPv4s ¶
LocalIPv4s ... LocalIPs return all non-loopback IPv4 addresses
Types ¶
type SpaceLimitCache ¶
type SpaceLimitCache struct {
// contains filtered or unexported fields
}
SpaceLimitCache lru缓存封装, 控制占用空间大小
func NewSpaceLimitCache ¶
func NewSpaceLimitCache(num, maxByteSize int) *SpaceLimitCache
NewSpaceLimitCache new space limit cache
func (*SpaceLimitCache) Add ¶
func (c *SpaceLimitCache) Add(key interface{}, val interface{}, size int) bool
Add add key val
func (*SpaceLimitCache) Contains ¶
func (c *SpaceLimitCache) Contains(key interface{}) bool
Contains check if exist
func (*SpaceLimitCache) Get ¶
func (c *SpaceLimitCache) Get(key interface{}) interface{}
Get get key
func (*SpaceLimitCache) Remove ¶
func (c *SpaceLimitCache) Remove(key interface{}) (interface{}, bool)
Remove remove key
Click to show internal directories.
Click to hide internal directories.