Versions in this module Expand all Collapse all v0 v0.0.1 Jan 14, 2025 Changes in this version + const HashVal + const Prime + var ShardCount = 32 + func MakeTLSConfig(tlsCert, tlsKey string, clientCa string) (*tls.Config, error) + func Watch(path string, batchFor time.Duration, processEvent func()) (func(), error) + func Zip(dst io.Writer, src string) error + func ZipToFile(dst, src string) error + type Fnv32Hash struct + func (f *Fnv32Hash) Sum(key string) uint32 + type IDWorker struct + func NewIDWorker(workerId int64) (*IDWorker, error) + func (w *IDWorker) NextID() (int64, error) + type IHash interface + Sum func(string) uint32 + func DefaultHash() IHash + type IterCb func(key string, v interface{}) + type RemoveCb func(key string, v interface{}, exists bool) bool + type ShardLockMaps struct + func NewShardLockMaps() ShardLockMaps + func NewWithCustomHash(hash IHash) ShardLockMaps + func (slm ShardLockMaps) Clear() + func (slm ShardLockMaps) Count() int + func (slm ShardLockMaps) Get(key string) (interface{}, bool) + func (slm ShardLockMaps) GetShard(key string) *SingleShardMap + func (slm ShardLockMaps) Has(key string) bool + func (slm ShardLockMaps) IsEmpty() bool + func (slm ShardLockMaps) Items() map[string]interface{} + func (slm ShardLockMaps) IterBuffered() <-chan Tuple + func (slm ShardLockMaps) IterCb(fn IterCb) + func (slm ShardLockMaps) Keys() []string + func (slm ShardLockMaps) MSet(data map[string]interface{}) + func (slm ShardLockMaps) MarshalJSON() ([]byte, error) + func (slm ShardLockMaps) Pop(key string) (v interface{}, exists bool) + func (slm ShardLockMaps) Remove(key string) + func (slm ShardLockMaps) RemoveCb(key string, cb RemoveCb) bool + func (slm ShardLockMaps) Set(key string, value interface{}) + func (slm ShardLockMaps) SetNX(key string, value interface{}) bool + func (slm ShardLockMaps) UnmarshalJSON(b []byte) (err error) + type SingleShardMap struct + type Tuple struct + Key string + Val interface{} + type Writer struct + func New(path string) *Writer + func (w *Writer) Close() error + func (w *Writer) SetCons(b bool) + func (w *Writer) SetMaxAge(ma int) + func (w *Writer) SetMaxSize(ms int64) + func (w *Writer) Write(p []byte) (n int, err error)