re-formatted, better structure
This commit is contained in:
16
util/cache/structs.go
vendored
Normal file
16
util/cache/structs.go
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"sync"
|
||||
)
|
||||
|
||||
type ShardedCache struct {
|
||||
shards []*shard
|
||||
shardMask uint32
|
||||
}
|
||||
|
||||
type shard struct {
|
||||
mu sync.RWMutex
|
||||
s2c map[string]string // serverId -> channelId
|
||||
c2s map[string]string // channelId -> serverId
|
||||
}
|
||||
Reference in New Issue
Block a user