Documentation ¶
Index ¶
- Constants
- type ByteMap
- func (m *ByteMap) Delete(key string)
- func (m *ByteMap) Keys() []string
- func (m *ByteMap) Load(key string) ([]byte, bool)
- func (m *ByteMap) LoadOrStore(key string, value []byte) ([]byte, bool)
- func (m *ByteMap) Range(f func(key string, value []byte) bool)
- func (m *ByteMap) Store(key string, value []byte)
- type IntMap
- type Map
- func (m *Map) Delete(key string)
- func (m *Map) Keys() []string
- func (m *Map) Load(key string) (interface{}, bool)
- func (m *Map) LoadOrStore(key string, value interface{}) (interface{}, bool)
- func (m *Map) Range(f func(key string, value interface{}) bool)
- func (m *Map) Store(key string, value interface{})
- type StringMap
- func (m *StringMap) Delete(key string)
- func (m *StringMap) Keys() []string
- func (m *StringMap) Load(key string) (string, bool)
- func (m *StringMap) LoadOrStore(key string, value string) (string, bool)
- func (m *StringMap) Range(f func(key string, value string) bool)
- func (m *StringMap) Store(key string, value string)
Constants ¶
const Version = "v0.0.1"
Version of syncx
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteMap ¶
type ByteMap struct {
// contains filtered or unexported fields
}
ByteMap wraps sync.Map and uses the following types: key: string value: []byte
func (*ByteMap) Load ¶
Load the key from the map. Returns []byte or bool. A false return indicates either the key was not found or the value is not of type []byte
func (*ByteMap) LoadOrStore ¶
LoadOrStore will return an existing key or store the value if not already in the map
type IntMap ¶
type IntMap struct {
// contains filtered or unexported fields
}
IntMap wraps sync.Map and uses the following types: key: string value: int
func (*IntMap) Load ¶
Load the key from the map. Returns int or bool. A false return indicates either the key was not found or the value is not of type int
func (*IntMap) LoadOrStore ¶
LoadOrStore will return an existing key or store the value if not already in the map
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map wraps sync.Map and uses the following types: key: string value: interface{}
func (*Map) Load ¶
Load the key from the map. Returns interface{} or bool. A false return indicates either the key was not found or the value is not of type interface{}
func (*Map) LoadOrStore ¶
LoadOrStore will return an existing key or store the value if not already in the map
type StringMap ¶
type StringMap struct {
// contains filtered or unexported fields
}
StringMap wraps sync.Map and uses the following types: key: string value: string
func (*StringMap) Load ¶
Load the key from the map. Returns string or bool. A false return indicates either the key was not found or the value is not of type string
func (*StringMap) LoadOrStore ¶
LoadOrStore will return an existing key or store the value if not already in the map