mirror of
https://github.com/oarkflow/mq.git
synced 2025-10-06 00:16:49 +08:00
16 lines
249 B
Go
16 lines
249 B
Go
package storage
|
|
|
|
// IMap is a thread-safe map interface.
|
|
type IMap[K comparable, V any] interface {
|
|
Get(K) (V, bool)
|
|
Set(K, V)
|
|
Del(K)
|
|
ForEach(func(K, V) bool)
|
|
Clear()
|
|
Size() int
|
|
Keys() []K
|
|
Values() []V
|
|
AsMap() map[K]V
|
|
Clone() IMap[K, V]
|
|
}
|