Documentation ¶
Overview ¶
Package safemap implements a map like container with rw lock to keep groutine safety.
Index ¶
- type SafeMap
- func (m *SafeMap) Clear()
- func (m *SafeMap) Delete(key interface{}) bool
- func (m *SafeMap) Get(key interface{}) (interface{}, bool)
- func (m *SafeMap) Has(key interface{}) bool
- func (m *SafeMap) Items() map[interface{}]interface{}
- func (m *SafeMap) Len() int
- func (m *SafeMap) Pop(key interface{}) (interface{}, bool)
- func (m *SafeMap) Set(key, val interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SafeMap ¶
type SafeMap struct {
// contains filtered or unexported fields
}
SafeMap is a type like map with rw lock.
func (*SafeMap) Items ¶
func (m *SafeMap) Items() map[interface{}]interface{}
Items returns all items in the map.
Click to show internal directories.
Click to hide internal directories.