Skip to content

Commit

Permalink
fixed lint-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
AshwinKul28 committed Oct 3, 2024
1 parent b903a2a commit d85b67a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions internal/querymanager/query_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
)

type (
cacheStore common.ITable[string, *object.Obj]
CacheStore common.ITable[string, *object.Obj]

// QuerySubscription represents a subscription to watch a query.
QuerySubscription struct {
Expand Down Expand Up @@ -54,7 +54,7 @@ type (
// Manager watches for changes in keys and notifies clients.
Manager struct {
WatchList sync.Map // WatchList is a map of query string to their respective clients, type: map[string]*sync.Map[int]struct{}
QueryCache common.ITable[string, cacheStore] // QueryCache is a map of fingerprints to their respective data caches
QueryCache common.ITable[string, CacheStore] // QueryCache is a map of fingerprints to their respective data caches
QueryCacheMu sync.RWMutex
logger *slog.Logger
}
Expand Down Expand Up @@ -86,23 +86,23 @@ func NewClientIdentifier(clientIdentifierID int, isHTTPClient bool) ClientIdenti
}
}

func NewQueryCacheStoreRegMap() common.ITable[string, cacheStore] {
return &common.RegMap[string, cacheStore]{
M: make(map[string]cacheStore),
func NewQueryCacheStoreRegMap() common.ITable[string, CacheStore] {
return &common.RegMap[string, CacheStore]{
M: make(map[string]CacheStore),
}
}

func NewQueryCacheStore() common.ITable[string, cacheStore] {
func NewQueryCacheStore() common.ITable[string, CacheStore] {
return NewQueryCacheStoreRegMap()
}

func NewCacheStoreRegMap() cacheStore {
func NewCacheStoreRegMap() CacheStore {
return &common.RegMap[string, *object.Obj]{
M: make(map[string]*object.Obj),
}
}

func NewCacheStore() cacheStore {
func NewCacheStore() CacheStore {
return NewCacheStoreRegMap()
}

Expand Down Expand Up @@ -221,7 +221,7 @@ func (m *Manager) updateQueryCache(queryFingerprint string, event dstore.QueryWa

store, ok := m.QueryCache.Get(queryFingerprint)
if !ok {
m.logger.Warn("Fingerprint not found in cacheStore", slog.String("fingerprint", queryFingerprint))
m.logger.Warn("Fingerprint not found in CacheStore", slog.String("fingerprint", queryFingerprint))
return
}

Expand Down

0 comments on commit d85b67a

Please sign in to comment.