Versions in this module Expand all Collapse all v1 v1.0.0 Sep 14, 2023 Changes in this version + func Bytes2String(b []byte) string + func CIDRRange(cidr string) (start uint32, end uint32, err error) + func Contains(s []string, e string) bool + func FNVHash(key string) uint32 + func Hash(qname string) uint32 + func LongIPv4(ip string) uint32 + func NextPow2(a int) int + func RReverseQname(s string) string + func RandStringBytesMaskImprSrc(n int) []byte + func ReverseQname(s string) string + func ReverseQnames(qname []string) string + func Shuffle(src []string) []string + func StringToBytes(s string) []byte + type CMap struct + func New(size int) *CMap + func NewCache(size int, evict bool) *CMap + func NewSmallMap(size int) *CMap + func (c *CMap) Add(key string, el interface{}) int + func (c *CMap) Clear() + func (c *CMap) Get(key string) (interface{}, bool) + func (c *CMap) LRU(lru bool) + func (c *CMap) Len() int + func (c *CMap) Remove(key string) + type MaxQueueUint64 struct + func NewMaxQueueUint64(size int) *MaxQueueUint64 + func (q *MaxQueueUint64) Dequeue() uint64 + func (q *MaxQueueUint64) Enqueue(val uint64) + func (q *MaxQueueUint64) Max() uint64 + type MaxStackUint64 struct + func (s *MaxStackUint64) Empty() bool + func (s *MaxStackUint64) Max() uint64 + func (s *MaxStackUint64) Pop() uint64 + func (s *MaxStackUint64) Push(val uint64) bool + type Shard struct + func NewShard(size int, evict bool) *Shard + func (s *Shard) Add(key string, el interface{}, lru bool) (evict int) + func (s *Shard) Clear() + func (s *Shard) Evict() + func (s *Shard) Get(key string, lru bool) (interface{}, bool) + func (s *Shard) Len() int + func (s *Shard) Remove(key string, lru bool)