Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RwSyncMap ¶
type RwSyncMap struct {
// contains filtered or unexported fields
}
RwSyncMap is a SyncMap implementation
type SyncMap ¶
type SyncMap interface { // Get item from SyncMap Get(key string) (interface{}, bool) // Set item to SyncMap Set(key string, val interface{}) // GetOrSet get item first, if not found, it will use creator to create one and return GetOrSet(key string, creator func(key string) (interface{}, error)) (interface{}, error) // Remove item from SyncMap Remove(key string) }
SyncMap is similar as sync.Map and add GetOrSet by creator
Click to show internal directories.
Click to hide internal directories.