Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetterFunc ¶
type SingleMap ¶
type SingleMap struct { // data store *sync.Map // 防止缓存击穿 avoid cache breakdown *singleflight.Group // contains filtered or unexported fields }
SingleMap 避免缓存击穿的map
func NewSingleMap ¶
func NewSingleMap(getterFunc GetterFunc) *SingleMap
Click to show internal directories.
Click to hide internal directories.