Versions in this module Expand all Collapse all v0 v0.0.2 Jul 12, 2024 Changes in this version + var SHARD_COUNT = 32 + func GetFailover(key, dir string) string + func GetFileName(cacheKey string, cacheDir string) string + func ReadConfigFromFile(cacheKey string, cacheDir string) (string, error) + func ReadServicesFromFile(cacheDir string) map[string]model.Service + func WriteConfigToFile(cacheKey string, cacheDir string, content string) + func WriteServicesToFile(service *model.Service, cacheKey, cacheDir string) + type ConcurrentMap []*ConcurrentMapShared + func NewConcurrentMap() ConcurrentMap + func (m ConcurrentMap) Count() int + func (m ConcurrentMap) Get(key string) (interface{}, bool) + func (m ConcurrentMap) GetShard(key string) *ConcurrentMapShared + func (m ConcurrentMap) Has(key string) bool + func (m ConcurrentMap) IsEmpty() bool + func (m ConcurrentMap) Items() map[string]interface{} + func (m ConcurrentMap) Iter() <-chan Tuple + func (m ConcurrentMap) IterBuffered() <-chan Tuple + func (m ConcurrentMap) IterCb(fn IterCb) + func (m ConcurrentMap) Keys() []string + func (m ConcurrentMap) MSet(data map[string]interface{}) + func (m ConcurrentMap) MarshalJSON() ([]byte, error) + func (m ConcurrentMap) Pop(key string) (v interface{}, exists bool) + func (m ConcurrentMap) Remove(key string) + func (m ConcurrentMap) Set(key string, value interface{}) + func (m ConcurrentMap) SetIfAbsent(key string, value interface{}) bool + func (m ConcurrentMap) Upsert(key string, value interface{}, cb UpsertCb) (res interface{}) + type ConcurrentMapShared struct + type IterCb func(key string, v interface{}) + type Tuple struct + Key string + Val interface{} + type UpsertCb func(exist bool, valueInMap interface{}, newValue interface{}) interface