Documentation ¶
Overview ¶
Package skipmap is a high-performance, scalable, concurrent-safe map based on skip-list. In the typical pattern(100000 operations, 90%LOAD 9%STORE 1%DELETE, 8C16T), the skipmap up to 10x faster than the built-in sync.Map.
Code generated by go run types_gen.go; DO NOT EDIT.
Index ¶
- type ByteMap
- func (s *ByteMap) Delete(key byte) bool
- func (s *ByteMap) Len() int
- func (s *ByteMap) Load(key byte) (value interface{}, ok bool)
- func (s *ByteMap) LoadAndDelete(key byte) (value interface{}, loaded bool)
- func (s *ByteMap) LoadOrStore(key byte, value interface{}) (actual interface{}, loaded bool)
- func (s *ByteMap) LoadOrStoreLazy(key byte, f func() interface{}) (actual interface{}, loaded bool)
- func (s *ByteMap) Range(f func(key byte, value interface{}) bool)
- func (s *ByteMap) Store(key byte, value interface{})
- type ByteMapDesc
- func (s *ByteMapDesc) Delete(key byte) bool
- func (s *ByteMapDesc) Len() int
- func (s *ByteMapDesc) Load(key byte) (value interface{}, ok bool)
- func (s *ByteMapDesc) LoadAndDelete(key byte) (value interface{}, loaded bool)
- func (s *ByteMapDesc) LoadOrStore(key byte, value interface{}) (actual interface{}, loaded bool)
- func (s *ByteMapDesc) LoadOrStoreLazy(key byte, f func() interface{}) (actual interface{}, loaded bool)
- func (s *ByteMapDesc) Range(f func(key byte, value interface{}) bool)
- func (s *ByteMapDesc) Store(key byte, value interface{})
- type Float32Map
- func (s *Float32Map) Delete(key float32) bool
- func (s *Float32Map) Len() int
- func (s *Float32Map) Load(key float32) (value interface{}, ok bool)
- func (s *Float32Map) LoadAndDelete(key float32) (value interface{}, loaded bool)
- func (s *Float32Map) LoadOrStore(key float32, value interface{}) (actual interface{}, loaded bool)
- func (s *Float32Map) LoadOrStoreLazy(key float32, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Float32Map) Range(f func(key float32, value interface{}) bool)
- func (s *Float32Map) Store(key float32, value interface{})
- type Float32MapDesc
- func (s *Float32MapDesc) Delete(key float32) bool
- func (s *Float32MapDesc) Len() int
- func (s *Float32MapDesc) Load(key float32) (value interface{}, ok bool)
- func (s *Float32MapDesc) LoadAndDelete(key float32) (value interface{}, loaded bool)
- func (s *Float32MapDesc) LoadOrStore(key float32, value interface{}) (actual interface{}, loaded bool)
- func (s *Float32MapDesc) LoadOrStoreLazy(key float32, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Float32MapDesc) Range(f func(key float32, value interface{}) bool)
- func (s *Float32MapDesc) Store(key float32, value interface{})
- type Float64Map
- func (s *Float64Map) Delete(key float64) bool
- func (s *Float64Map) Len() int
- func (s *Float64Map) Load(key float64) (value interface{}, ok bool)
- func (s *Float64Map) LoadAndDelete(key float64) (value interface{}, loaded bool)
- func (s *Float64Map) LoadOrStore(key float64, value interface{}) (actual interface{}, loaded bool)
- func (s *Float64Map) LoadOrStoreLazy(key float64, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Float64Map) Range(f func(key float64, value interface{}) bool)
- func (s *Float64Map) Store(key float64, value interface{})
- type Float64MapDesc
- func (s *Float64MapDesc) Delete(key float64) bool
- func (s *Float64MapDesc) Len() int
- func (s *Float64MapDesc) Load(key float64) (value interface{}, ok bool)
- func (s *Float64MapDesc) LoadAndDelete(key float64) (value interface{}, loaded bool)
- func (s *Float64MapDesc) LoadOrStore(key float64, value interface{}) (actual interface{}, loaded bool)
- func (s *Float64MapDesc) LoadOrStoreLazy(key float64, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Float64MapDesc) Range(f func(key float64, value interface{}) bool)
- func (s *Float64MapDesc) Store(key float64, value interface{})
- type Int16Map
- func (s *Int16Map) Delete(key int16) bool
- func (s *Int16Map) Len() int
- func (s *Int16Map) Load(key int16) (value interface{}, ok bool)
- func (s *Int16Map) LoadAndDelete(key int16) (value interface{}, loaded bool)
- func (s *Int16Map) LoadOrStore(key int16, value interface{}) (actual interface{}, loaded bool)
- func (s *Int16Map) LoadOrStoreLazy(key int16, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Int16Map) Range(f func(key int16, value interface{}) bool)
- func (s *Int16Map) Store(key int16, value interface{})
- type Int16MapDesc
- func (s *Int16MapDesc) Delete(key int16) bool
- func (s *Int16MapDesc) Len() int
- func (s *Int16MapDesc) Load(key int16) (value interface{}, ok bool)
- func (s *Int16MapDesc) LoadAndDelete(key int16) (value interface{}, loaded bool)
- func (s *Int16MapDesc) LoadOrStore(key int16, value interface{}) (actual interface{}, loaded bool)
- func (s *Int16MapDesc) LoadOrStoreLazy(key int16, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Int16MapDesc) Range(f func(key int16, value interface{}) bool)
- func (s *Int16MapDesc) Store(key int16, value interface{})
- type Int32Map
- func (s *Int32Map) Delete(key int32) bool
- func (s *Int32Map) Len() int
- func (s *Int32Map) Load(key int32) (value interface{}, ok bool)
- func (s *Int32Map) LoadAndDelete(key int32) (value interface{}, loaded bool)
- func (s *Int32Map) LoadOrStore(key int32, value interface{}) (actual interface{}, loaded bool)
- func (s *Int32Map) LoadOrStoreLazy(key int32, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Int32Map) Range(f func(key int32, value interface{}) bool)
- func (s *Int32Map) Store(key int32, value interface{})
- type Int32MapDesc
- func (s *Int32MapDesc) Delete(key int32) bool
- func (s *Int32MapDesc) Len() int
- func (s *Int32MapDesc) Load(key int32) (value interface{}, ok bool)
- func (s *Int32MapDesc) LoadAndDelete(key int32) (value interface{}, loaded bool)
- func (s *Int32MapDesc) LoadOrStore(key int32, value interface{}) (actual interface{}, loaded bool)
- func (s *Int32MapDesc) LoadOrStoreLazy(key int32, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Int32MapDesc) Range(f func(key int32, value interface{}) bool)
- func (s *Int32MapDesc) Store(key int32, value interface{})
- type Int64Map
- func (s *Int64Map) Delete(key int64) bool
- func (s *Int64Map) Len() int
- func (s *Int64Map) Load(key int64) (value interface{}, ok bool)
- func (s *Int64Map) LoadAndDelete(key int64) (value interface{}, loaded bool)
- func (s *Int64Map) LoadOrStore(key int64, value interface{}) (actual interface{}, loaded bool)
- func (s *Int64Map) LoadOrStoreLazy(key int64, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Int64Map) Range(f func(key int64, value interface{}) bool)
- func (s *Int64Map) Store(key int64, value interface{})
- type Int8Map
- func (s *Int8Map) Delete(key int8) bool
- func (s *Int8Map) Len() int
- func (s *Int8Map) Load(key int8) (value interface{}, ok bool)
- func (s *Int8Map) LoadAndDelete(key int8) (value interface{}, loaded bool)
- func (s *Int8Map) LoadOrStore(key int8, value interface{}) (actual interface{}, loaded bool)
- func (s *Int8Map) LoadOrStoreLazy(key int8, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Int8Map) Range(f func(key int8, value interface{}) bool)
- func (s *Int8Map) Store(key int8, value interface{})
- type Int8MapDesc
- func (s *Int8MapDesc) Delete(key int8) bool
- func (s *Int8MapDesc) Len() int
- func (s *Int8MapDesc) Load(key int8) (value interface{}, ok bool)
- func (s *Int8MapDesc) LoadAndDelete(key int8) (value interface{}, loaded bool)
- func (s *Int8MapDesc) LoadOrStore(key int8, value interface{}) (actual interface{}, loaded bool)
- func (s *Int8MapDesc) LoadOrStoreLazy(key int8, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Int8MapDesc) Range(f func(key int8, value interface{}) bool)
- func (s *Int8MapDesc) Store(key int8, value interface{})
- type IntMap
- func (s *IntMap) Delete(key int) bool
- func (s *IntMap) Len() int
- func (s *IntMap) Load(key int) (value interface{}, ok bool)
- func (s *IntMap) LoadAndDelete(key int) (value interface{}, loaded bool)
- func (s *IntMap) LoadOrStore(key int, value interface{}) (actual interface{}, loaded bool)
- func (s *IntMap) LoadOrStoreLazy(key int, f func() interface{}) (actual interface{}, loaded bool)
- func (s *IntMap) Range(f func(key int, value interface{}) bool)
- func (s *IntMap) Store(key int, value interface{})
- type IntMapDesc
- func (s *IntMapDesc) Delete(key int) bool
- func (s *IntMapDesc) Len() int
- func (s *IntMapDesc) Load(key int) (value interface{}, ok bool)
- func (s *IntMapDesc) LoadAndDelete(key int) (value interface{}, loaded bool)
- func (s *IntMapDesc) LoadOrStore(key int, value interface{}) (actual interface{}, loaded bool)
- func (s *IntMapDesc) LoadOrStoreLazy(key int, f func() interface{}) (actual interface{}, loaded bool)
- func (s *IntMapDesc) Range(f func(key int, value interface{}) bool)
- func (s *IntMapDesc) Store(key int, value interface{})
- type RuneMap
- func (s *RuneMap) Delete(key rune) bool
- func (s *RuneMap) Len() int
- func (s *RuneMap) Load(key rune) (value interface{}, ok bool)
- func (s *RuneMap) LoadAndDelete(key rune) (value interface{}, loaded bool)
- func (s *RuneMap) LoadOrStore(key rune, value interface{}) (actual interface{}, loaded bool)
- func (s *RuneMap) LoadOrStoreLazy(key rune, f func() interface{}) (actual interface{}, loaded bool)
- func (s *RuneMap) Range(f func(key rune, value interface{}) bool)
- func (s *RuneMap) Store(key rune, value interface{})
- type RuneMapDesc
- func (s *RuneMapDesc) Delete(key rune) bool
- func (s *RuneMapDesc) Len() int
- func (s *RuneMapDesc) Load(key rune) (value interface{}, ok bool)
- func (s *RuneMapDesc) LoadAndDelete(key rune) (value interface{}, loaded bool)
- func (s *RuneMapDesc) LoadOrStore(key rune, value interface{}) (actual interface{}, loaded bool)
- func (s *RuneMapDesc) LoadOrStoreLazy(key rune, f func() interface{}) (actual interface{}, loaded bool)
- func (s *RuneMapDesc) Range(f func(key rune, value interface{}) bool)
- func (s *RuneMapDesc) Store(key rune, value interface{})
- type StringMap
- func (s *StringMap) Delete(key string) bool
- func (s *StringMap) Len() int
- func (s *StringMap) Load(key string) (value interface{}, ok bool)
- func (s *StringMap) LoadAndDelete(key string) (value interface{}, loaded bool)
- func (s *StringMap) LoadOrStore(key string, value interface{}) (actual interface{}, loaded bool)
- func (s *StringMap) LoadOrStoreLazy(key string, f func() interface{}) (actual interface{}, loaded bool)
- func (s *StringMap) Range(f func(key string, value interface{}) bool)
- func (s *StringMap) Store(key string, value interface{})
- type Uint16Map
- func (s *Uint16Map) Delete(key uint16) bool
- func (s *Uint16Map) Len() int
- func (s *Uint16Map) Load(key uint16) (value interface{}, ok bool)
- func (s *Uint16Map) LoadAndDelete(key uint16) (value interface{}, loaded bool)
- func (s *Uint16Map) LoadOrStore(key uint16, value interface{}) (actual interface{}, loaded bool)
- func (s *Uint16Map) LoadOrStoreLazy(key uint16, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Uint16Map) Range(f func(key uint16, value interface{}) bool)
- func (s *Uint16Map) Store(key uint16, value interface{})
- type Uint16MapDesc
- func (s *Uint16MapDesc) Delete(key uint16) bool
- func (s *Uint16MapDesc) Len() int
- func (s *Uint16MapDesc) Load(key uint16) (value interface{}, ok bool)
- func (s *Uint16MapDesc) LoadAndDelete(key uint16) (value interface{}, loaded bool)
- func (s *Uint16MapDesc) LoadOrStore(key uint16, value interface{}) (actual interface{}, loaded bool)
- func (s *Uint16MapDesc) LoadOrStoreLazy(key uint16, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Uint16MapDesc) Range(f func(key uint16, value interface{}) bool)
- func (s *Uint16MapDesc) Store(key uint16, value interface{})
- type Uint32Map
- func (s *Uint32Map) Delete(key uint32) bool
- func (s *Uint32Map) Len() int
- func (s *Uint32Map) Load(key uint32) (value interface{}, ok bool)
- func (s *Uint32Map) LoadAndDelete(key uint32) (value interface{}, loaded bool)
- func (s *Uint32Map) LoadOrStore(key uint32, value interface{}) (actual interface{}, loaded bool)
- func (s *Uint32Map) LoadOrStoreLazy(key uint32, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Uint32Map) Range(f func(key uint32, value interface{}) bool)
- func (s *Uint32Map) Store(key uint32, value interface{})
- type Uint32MapDesc
- func (s *Uint32MapDesc) Delete(key uint32) bool
- func (s *Uint32MapDesc) Len() int
- func (s *Uint32MapDesc) Load(key uint32) (value interface{}, ok bool)
- func (s *Uint32MapDesc) LoadAndDelete(key uint32) (value interface{}, loaded bool)
- func (s *Uint32MapDesc) LoadOrStore(key uint32, value interface{}) (actual interface{}, loaded bool)
- func (s *Uint32MapDesc) LoadOrStoreLazy(key uint32, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Uint32MapDesc) Range(f func(key uint32, value interface{}) bool)
- func (s *Uint32MapDesc) Store(key uint32, value interface{})
- type Uint64Map
- func (s *Uint64Map) Delete(key uint64) bool
- func (s *Uint64Map) Len() int
- func (s *Uint64Map) Load(key uint64) (value interface{}, ok bool)
- func (s *Uint64Map) LoadAndDelete(key uint64) (value interface{}, loaded bool)
- func (s *Uint64Map) LoadOrStore(key uint64, value interface{}) (actual interface{}, loaded bool)
- func (s *Uint64Map) LoadOrStoreLazy(key uint64, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Uint64Map) Range(f func(key uint64, value interface{}) bool)
- func (s *Uint64Map) Store(key uint64, value interface{})
- type Uint64MapDesc
- func (s *Uint64MapDesc) Delete(key uint64) bool
- func (s *Uint64MapDesc) Len() int
- func (s *Uint64MapDesc) Load(key uint64) (value interface{}, ok bool)
- func (s *Uint64MapDesc) LoadAndDelete(key uint64) (value interface{}, loaded bool)
- func (s *Uint64MapDesc) LoadOrStore(key uint64, value interface{}) (actual interface{}, loaded bool)
- func (s *Uint64MapDesc) LoadOrStoreLazy(key uint64, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Uint64MapDesc) Range(f func(key uint64, value interface{}) bool)
- func (s *Uint64MapDesc) Store(key uint64, value interface{})
- type Uint8Map
- func (s *Uint8Map) Delete(key uint8) bool
- func (s *Uint8Map) Len() int
- func (s *Uint8Map) Load(key uint8) (value interface{}, ok bool)
- func (s *Uint8Map) LoadAndDelete(key uint8) (value interface{}, loaded bool)
- func (s *Uint8Map) LoadOrStore(key uint8, value interface{}) (actual interface{}, loaded bool)
- func (s *Uint8Map) LoadOrStoreLazy(key uint8, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Uint8Map) Range(f func(key uint8, value interface{}) bool)
- func (s *Uint8Map) Store(key uint8, value interface{})
- type Uint8MapDesc
- func (s *Uint8MapDesc) Delete(key uint8) bool
- func (s *Uint8MapDesc) Len() int
- func (s *Uint8MapDesc) Load(key uint8) (value interface{}, ok bool)
- func (s *Uint8MapDesc) LoadAndDelete(key uint8) (value interface{}, loaded bool)
- func (s *Uint8MapDesc) LoadOrStore(key uint8, value interface{}) (actual interface{}, loaded bool)
- func (s *Uint8MapDesc) LoadOrStoreLazy(key uint8, f func() interface{}) (actual interface{}, loaded bool)
- func (s *Uint8MapDesc) Range(f func(key uint8, value interface{}) bool)
- func (s *Uint8MapDesc) Store(key uint8, value interface{})
- type UintMap
- func (s *UintMap) Delete(key uint) bool
- func (s *UintMap) Len() int
- func (s *UintMap) Load(key uint) (value interface{}, ok bool)
- func (s *UintMap) LoadAndDelete(key uint) (value interface{}, loaded bool)
- func (s *UintMap) LoadOrStore(key uint, value interface{}) (actual interface{}, loaded bool)
- func (s *UintMap) LoadOrStoreLazy(key uint, f func() interface{}) (actual interface{}, loaded bool)
- func (s *UintMap) Range(f func(key uint, value interface{}) bool)
- func (s *UintMap) Store(key uint, value interface{})
- type UintMapDesc
- func (s *UintMapDesc) Delete(key uint) bool
- func (s *UintMapDesc) Len() int
- func (s *UintMapDesc) Load(key uint) (value interface{}, ok bool)
- func (s *UintMapDesc) LoadAndDelete(key uint) (value interface{}, loaded bool)
- func (s *UintMapDesc) LoadOrStore(key uint, value interface{}) (actual interface{}, loaded bool)
- func (s *UintMapDesc) LoadOrStoreLazy(key uint, f func() interface{}) (actual interface{}, loaded bool)
- func (s *UintMapDesc) Range(f func(key uint, value interface{}) bool)
- func (s *UintMapDesc) Store(key uint, value interface{})
- type UintptrMap
- func (s *UintptrMap) Delete(key uintptr) bool
- func (s *UintptrMap) Len() int
- func (s *UintptrMap) Load(key uintptr) (value interface{}, ok bool)
- func (s *UintptrMap) LoadAndDelete(key uintptr) (value interface{}, loaded bool)
- func (s *UintptrMap) LoadOrStore(key uintptr, value interface{}) (actual interface{}, loaded bool)
- func (s *UintptrMap) LoadOrStoreLazy(key uintptr, f func() interface{}) (actual interface{}, loaded bool)
- func (s *UintptrMap) Range(f func(key uintptr, value interface{}) bool)
- func (s *UintptrMap) Store(key uintptr, value interface{})
- type UintptrMapDesc
- func (s *UintptrMapDesc) Delete(key uintptr) bool
- func (s *UintptrMapDesc) Len() int
- func (s *UintptrMapDesc) Load(key uintptr) (value interface{}, ok bool)
- func (s *UintptrMapDesc) LoadAndDelete(key uintptr) (value interface{}, loaded bool)
- func (s *UintptrMapDesc) LoadOrStore(key uintptr, value interface{}) (actual interface{}, loaded bool)
- func (s *UintptrMapDesc) LoadOrStoreLazy(key uintptr, f func() interface{}) (actual interface{}, loaded bool)
- func (s *UintptrMapDesc) Range(f func(key uintptr, value interface{}) bool)
- func (s *UintptrMapDesc) Store(key uintptr, value interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteMap ¶
type ByteMap struct {
// contains filtered or unexported fields
}
ByteMap represents a map based on skip list in ascending order.
func (*ByteMap) Load ¶
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*ByteMap) LoadAndDelete ¶
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*ByteMap) LoadOrStore ¶
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*ByteMap) LoadOrStoreLazy ¶
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*ByteMap) Range ¶
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
type ByteMapDesc ¶
type ByteMapDesc struct {
// contains filtered or unexported fields
}
ByteMapDesc represents a map based on skip list in descending order.
func (*ByteMapDesc) Delete ¶
func (s *ByteMapDesc) Delete(key byte) bool
Delete deletes the value for a key.
func (*ByteMapDesc) Load ¶
func (s *ByteMapDesc) Load(key byte) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*ByteMapDesc) LoadAndDelete ¶
func (s *ByteMapDesc) LoadAndDelete(key byte) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*ByteMapDesc) LoadOrStore ¶
func (s *ByteMapDesc) LoadOrStore(key byte, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*ByteMapDesc) LoadOrStoreLazy ¶
func (s *ByteMapDesc) LoadOrStoreLazy(key byte, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*ByteMapDesc) Range ¶
func (s *ByteMapDesc) Range(f func(key byte, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*ByteMapDesc) Store ¶
func (s *ByteMapDesc) Store(key byte, value interface{})
Store sets the value for a key.
type Float32Map ¶
type Float32Map struct {
// contains filtered or unexported fields
}
Float32Map represents a map based on skip list in ascending order.
func (*Float32Map) Delete ¶
func (s *Float32Map) Delete(key float32) bool
Delete deletes the value for a key.
func (*Float32Map) Load ¶
func (s *Float32Map) Load(key float32) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Float32Map) LoadAndDelete ¶
func (s *Float32Map) LoadAndDelete(key float32) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Float32Map) LoadOrStore ¶
func (s *Float32Map) LoadOrStore(key float32, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Float32Map) LoadOrStoreLazy ¶
func (s *Float32Map) LoadOrStoreLazy(key float32, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Float32Map) Range ¶
func (s *Float32Map) Range(f func(key float32, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*Float32Map) Store ¶
func (s *Float32Map) Store(key float32, value interface{})
Store sets the value for a key.
type Float32MapDesc ¶
type Float32MapDesc struct {
// contains filtered or unexported fields
}
Float32MapDesc represents a map based on skip list in descending order.
func NewFloat32Desc ¶
func NewFloat32Desc() *Float32MapDesc
NewFloat32Desc return an empty float32 skipmap.
func (*Float32MapDesc) Delete ¶
func (s *Float32MapDesc) Delete(key float32) bool
Delete deletes the value for a key.
func (*Float32MapDesc) Len ¶
func (s *Float32MapDesc) Len() int
Len return the length of this skipmap.
func (*Float32MapDesc) Load ¶
func (s *Float32MapDesc) Load(key float32) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Float32MapDesc) LoadAndDelete ¶
func (s *Float32MapDesc) LoadAndDelete(key float32) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Float32MapDesc) LoadOrStore ¶
func (s *Float32MapDesc) LoadOrStore(key float32, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Float32MapDesc) LoadOrStoreLazy ¶
func (s *Float32MapDesc) LoadOrStoreLazy(key float32, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Float32MapDesc) Range ¶
func (s *Float32MapDesc) Range(f func(key float32, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*Float32MapDesc) Store ¶
func (s *Float32MapDesc) Store(key float32, value interface{})
Store sets the value for a key.
type Float64Map ¶
type Float64Map struct {
// contains filtered or unexported fields
}
Float64Map represents a map based on skip list in ascending order.
func (*Float64Map) Delete ¶
func (s *Float64Map) Delete(key float64) bool
Delete deletes the value for a key.
func (*Float64Map) Load ¶
func (s *Float64Map) Load(key float64) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Float64Map) LoadAndDelete ¶
func (s *Float64Map) LoadAndDelete(key float64) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Float64Map) LoadOrStore ¶
func (s *Float64Map) LoadOrStore(key float64, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Float64Map) LoadOrStoreLazy ¶
func (s *Float64Map) LoadOrStoreLazy(key float64, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Float64Map) Range ¶
func (s *Float64Map) Range(f func(key float64, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*Float64Map) Store ¶
func (s *Float64Map) Store(key float64, value interface{})
Store sets the value for a key.
type Float64MapDesc ¶
type Float64MapDesc struct {
// contains filtered or unexported fields
}
Float64MapDesc represents a map based on skip list in descending order.
func NewFloat64Desc ¶
func NewFloat64Desc() *Float64MapDesc
NewFloat64Desc return an empty float64 skipmap.
func (*Float64MapDesc) Delete ¶
func (s *Float64MapDesc) Delete(key float64) bool
Delete deletes the value for a key.
func (*Float64MapDesc) Len ¶
func (s *Float64MapDesc) Len() int
Len return the length of this skipmap.
func (*Float64MapDesc) Load ¶
func (s *Float64MapDesc) Load(key float64) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Float64MapDesc) LoadAndDelete ¶
func (s *Float64MapDesc) LoadAndDelete(key float64) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Float64MapDesc) LoadOrStore ¶
func (s *Float64MapDesc) LoadOrStore(key float64, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Float64MapDesc) LoadOrStoreLazy ¶
func (s *Float64MapDesc) LoadOrStoreLazy(key float64, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Float64MapDesc) Range ¶
func (s *Float64MapDesc) Range(f func(key float64, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*Float64MapDesc) Store ¶
func (s *Float64MapDesc) Store(key float64, value interface{})
Store sets the value for a key.
type Int16Map ¶
type Int16Map struct {
// contains filtered or unexported fields
}
Int16Map represents a map based on skip list in ascending order.
func (*Int16Map) Load ¶
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Int16Map) LoadAndDelete ¶
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Int16Map) LoadOrStore ¶
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Int16Map) LoadOrStoreLazy ¶
func (s *Int16Map) LoadOrStoreLazy(key int16, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Int16Map) Range ¶
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
type Int16MapDesc ¶
type Int16MapDesc struct {
// contains filtered or unexported fields
}
Int16MapDesc represents a map based on skip list in descending order.
func (*Int16MapDesc) Delete ¶
func (s *Int16MapDesc) Delete(key int16) bool
Delete deletes the value for a key.
func (*Int16MapDesc) Load ¶
func (s *Int16MapDesc) Load(key int16) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Int16MapDesc) LoadAndDelete ¶
func (s *Int16MapDesc) LoadAndDelete(key int16) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Int16MapDesc) LoadOrStore ¶
func (s *Int16MapDesc) LoadOrStore(key int16, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Int16MapDesc) LoadOrStoreLazy ¶
func (s *Int16MapDesc) LoadOrStoreLazy(key int16, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Int16MapDesc) Range ¶
func (s *Int16MapDesc) Range(f func(key int16, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*Int16MapDesc) Store ¶
func (s *Int16MapDesc) Store(key int16, value interface{})
Store sets the value for a key.
type Int32Map ¶
type Int32Map struct {
// contains filtered or unexported fields
}
Int32Map represents a map based on skip list in ascending order.
func (*Int32Map) Load ¶
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Int32Map) LoadAndDelete ¶
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Int32Map) LoadOrStore ¶
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Int32Map) LoadOrStoreLazy ¶
func (s *Int32Map) LoadOrStoreLazy(key int32, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Int32Map) Range ¶
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
type Int32MapDesc ¶
type Int32MapDesc struct {
// contains filtered or unexported fields
}
Int32MapDesc represents a map based on skip list in descending order.
func (*Int32MapDesc) Delete ¶
func (s *Int32MapDesc) Delete(key int32) bool
Delete deletes the value for a key.
func (*Int32MapDesc) Load ¶
func (s *Int32MapDesc) Load(key int32) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Int32MapDesc) LoadAndDelete ¶
func (s *Int32MapDesc) LoadAndDelete(key int32) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Int32MapDesc) LoadOrStore ¶
func (s *Int32MapDesc) LoadOrStore(key int32, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Int32MapDesc) LoadOrStoreLazy ¶
func (s *Int32MapDesc) LoadOrStoreLazy(key int32, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Int32MapDesc) Range ¶
func (s *Int32MapDesc) Range(f func(key int32, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*Int32MapDesc) Store ¶
func (s *Int32MapDesc) Store(key int32, value interface{})
Store sets the value for a key.
type Int64Map ¶
type Int64Map struct {
// contains filtered or unexported fields
}
Int64Map represents a map based on skip list in ascending order.
func (*Int64Map) Load ¶
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Int64Map) LoadAndDelete ¶
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Int64Map) LoadOrStore ¶
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Int64Map) LoadOrStoreLazy ¶
func (s *Int64Map) LoadOrStoreLazy(key int64, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Int64Map) Range ¶
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
type Int8Map ¶
type Int8Map struct {
// contains filtered or unexported fields
}
Int8Map represents a map based on skip list in ascending order.
func (*Int8Map) Load ¶
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Int8Map) LoadAndDelete ¶
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Int8Map) LoadOrStore ¶
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Int8Map) LoadOrStoreLazy ¶
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Int8Map) Range ¶
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
type Int8MapDesc ¶
type Int8MapDesc struct {
// contains filtered or unexported fields
}
Int8MapDesc represents a map based on skip list in descending order.
func (*Int8MapDesc) Delete ¶
func (s *Int8MapDesc) Delete(key int8) bool
Delete deletes the value for a key.
func (*Int8MapDesc) Load ¶
func (s *Int8MapDesc) Load(key int8) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Int8MapDesc) LoadAndDelete ¶
func (s *Int8MapDesc) LoadAndDelete(key int8) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Int8MapDesc) LoadOrStore ¶
func (s *Int8MapDesc) LoadOrStore(key int8, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Int8MapDesc) LoadOrStoreLazy ¶
func (s *Int8MapDesc) LoadOrStoreLazy(key int8, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Int8MapDesc) Range ¶
func (s *Int8MapDesc) Range(f func(key int8, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*Int8MapDesc) Store ¶
func (s *Int8MapDesc) Store(key int8, value interface{})
Store sets the value for a key.
type IntMap ¶
type IntMap struct {
// contains filtered or unexported fields
}
IntMap represents a map based on skip list in ascending order.
func (*IntMap) Load ¶
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*IntMap) LoadAndDelete ¶
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*IntMap) LoadOrStore ¶
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*IntMap) LoadOrStoreLazy ¶
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*IntMap) Range ¶
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
type IntMapDesc ¶
type IntMapDesc struct {
// contains filtered or unexported fields
}
IntMapDesc represents a map based on skip list in descending order.
func (*IntMapDesc) Delete ¶
func (s *IntMapDesc) Delete(key int) bool
Delete deletes the value for a key.
func (*IntMapDesc) Load ¶
func (s *IntMapDesc) Load(key int) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*IntMapDesc) LoadAndDelete ¶
func (s *IntMapDesc) LoadAndDelete(key int) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*IntMapDesc) LoadOrStore ¶
func (s *IntMapDesc) LoadOrStore(key int, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*IntMapDesc) LoadOrStoreLazy ¶
func (s *IntMapDesc) LoadOrStoreLazy(key int, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*IntMapDesc) Range ¶
func (s *IntMapDesc) Range(f func(key int, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*IntMapDesc) Store ¶
func (s *IntMapDesc) Store(key int, value interface{})
Store sets the value for a key.
type RuneMap ¶
type RuneMap struct {
// contains filtered or unexported fields
}
RuneMap represents a map based on skip list in ascending order.
func (*RuneMap) Load ¶
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*RuneMap) LoadAndDelete ¶
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*RuneMap) LoadOrStore ¶
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*RuneMap) LoadOrStoreLazy ¶
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*RuneMap) Range ¶
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
type RuneMapDesc ¶
type RuneMapDesc struct {
// contains filtered or unexported fields
}
RuneMapDesc represents a map based on skip list in descending order.
func (*RuneMapDesc) Delete ¶
func (s *RuneMapDesc) Delete(key rune) bool
Delete deletes the value for a key.
func (*RuneMapDesc) Load ¶
func (s *RuneMapDesc) Load(key rune) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*RuneMapDesc) LoadAndDelete ¶
func (s *RuneMapDesc) LoadAndDelete(key rune) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*RuneMapDesc) LoadOrStore ¶
func (s *RuneMapDesc) LoadOrStore(key rune, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*RuneMapDesc) LoadOrStoreLazy ¶
func (s *RuneMapDesc) LoadOrStoreLazy(key rune, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*RuneMapDesc) Range ¶
func (s *RuneMapDesc) Range(f func(key rune, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*RuneMapDesc) Store ¶
func (s *RuneMapDesc) Store(key rune, value interface{})
Store sets the value for a key.
type StringMap ¶
type StringMap struct {
// contains filtered or unexported fields
}
StringMap represents a map based on skip list.
func (*StringMap) Load ¶
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*StringMap) LoadAndDelete ¶
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*StringMap) LoadOrStore ¶
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*StringMap) LoadOrStoreLazy ¶
func (s *StringMap) LoadOrStoreLazy(key string, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*StringMap) Range ¶
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
type Uint16Map ¶
type Uint16Map struct {
// contains filtered or unexported fields
}
Uint16Map represents a map based on skip list in ascending order.
func (*Uint16Map) Load ¶
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Uint16Map) LoadAndDelete ¶
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Uint16Map) LoadOrStore ¶
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Uint16Map) LoadOrStoreLazy ¶
func (s *Uint16Map) LoadOrStoreLazy(key uint16, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Uint16Map) Range ¶
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
type Uint16MapDesc ¶
type Uint16MapDesc struct {
// contains filtered or unexported fields
}
Uint16MapDesc represents a map based on skip list in descending order.
func NewUint16Desc ¶
func NewUint16Desc() *Uint16MapDesc
NewUint16Desc return an empty uint16 skipmap.
func (*Uint16MapDesc) Delete ¶
func (s *Uint16MapDesc) Delete(key uint16) bool
Delete deletes the value for a key.
func (*Uint16MapDesc) Len ¶
func (s *Uint16MapDesc) Len() int
Len return the length of this skipmap.
func (*Uint16MapDesc) Load ¶
func (s *Uint16MapDesc) Load(key uint16) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Uint16MapDesc) LoadAndDelete ¶
func (s *Uint16MapDesc) LoadAndDelete(key uint16) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Uint16MapDesc) LoadOrStore ¶
func (s *Uint16MapDesc) LoadOrStore(key uint16, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Uint16MapDesc) LoadOrStoreLazy ¶
func (s *Uint16MapDesc) LoadOrStoreLazy(key uint16, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Uint16MapDesc) Range ¶
func (s *Uint16MapDesc) Range(f func(key uint16, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*Uint16MapDesc) Store ¶
func (s *Uint16MapDesc) Store(key uint16, value interface{})
Store sets the value for a key.
type Uint32Map ¶
type Uint32Map struct {
// contains filtered or unexported fields
}
Uint32Map represents a map based on skip list in ascending order.
func (*Uint32Map) Load ¶
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Uint32Map) LoadAndDelete ¶
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Uint32Map) LoadOrStore ¶
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Uint32Map) LoadOrStoreLazy ¶
func (s *Uint32Map) LoadOrStoreLazy(key uint32, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Uint32Map) Range ¶
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
type Uint32MapDesc ¶
type Uint32MapDesc struct {
// contains filtered or unexported fields
}
Uint32MapDesc represents a map based on skip list in descending order.
func NewUint32Desc ¶
func NewUint32Desc() *Uint32MapDesc
NewUint32Desc return an empty uint32 skipmap.
func (*Uint32MapDesc) Delete ¶
func (s *Uint32MapDesc) Delete(key uint32) bool
Delete deletes the value for a key.
func (*Uint32MapDesc) Len ¶
func (s *Uint32MapDesc) Len() int
Len return the length of this skipmap.
func (*Uint32MapDesc) Load ¶
func (s *Uint32MapDesc) Load(key uint32) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Uint32MapDesc) LoadAndDelete ¶
func (s *Uint32MapDesc) LoadAndDelete(key uint32) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Uint32MapDesc) LoadOrStore ¶
func (s *Uint32MapDesc) LoadOrStore(key uint32, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Uint32MapDesc) LoadOrStoreLazy ¶
func (s *Uint32MapDesc) LoadOrStoreLazy(key uint32, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Uint32MapDesc) Range ¶
func (s *Uint32MapDesc) Range(f func(key uint32, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*Uint32MapDesc) Store ¶
func (s *Uint32MapDesc) Store(key uint32, value interface{})
Store sets the value for a key.
type Uint64Map ¶
type Uint64Map struct {
// contains filtered or unexported fields
}
Uint64Map represents a map based on skip list in ascending order.
func (*Uint64Map) Load ¶
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Uint64Map) LoadAndDelete ¶
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Uint64Map) LoadOrStore ¶
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Uint64Map) LoadOrStoreLazy ¶
func (s *Uint64Map) LoadOrStoreLazy(key uint64, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Uint64Map) Range ¶
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
type Uint64MapDesc ¶
type Uint64MapDesc struct {
// contains filtered or unexported fields
}
Uint64MapDesc represents a map based on skip list in descending order.
func NewUint64Desc ¶
func NewUint64Desc() *Uint64MapDesc
NewUint64Desc return an empty uint64 skipmap.
func (*Uint64MapDesc) Delete ¶
func (s *Uint64MapDesc) Delete(key uint64) bool
Delete deletes the value for a key.
func (*Uint64MapDesc) Len ¶
func (s *Uint64MapDesc) Len() int
Len return the length of this skipmap.
func (*Uint64MapDesc) Load ¶
func (s *Uint64MapDesc) Load(key uint64) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Uint64MapDesc) LoadAndDelete ¶
func (s *Uint64MapDesc) LoadAndDelete(key uint64) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Uint64MapDesc) LoadOrStore ¶
func (s *Uint64MapDesc) LoadOrStore(key uint64, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Uint64MapDesc) LoadOrStoreLazy ¶
func (s *Uint64MapDesc) LoadOrStoreLazy(key uint64, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Uint64MapDesc) Range ¶
func (s *Uint64MapDesc) Range(f func(key uint64, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*Uint64MapDesc) Store ¶
func (s *Uint64MapDesc) Store(key uint64, value interface{})
Store sets the value for a key.
type Uint8Map ¶
type Uint8Map struct {
// contains filtered or unexported fields
}
Uint8Map represents a map based on skip list in ascending order.
func (*Uint8Map) Load ¶
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Uint8Map) LoadAndDelete ¶
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Uint8Map) LoadOrStore ¶
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Uint8Map) LoadOrStoreLazy ¶
func (s *Uint8Map) LoadOrStoreLazy(key uint8, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Uint8Map) Range ¶
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
type Uint8MapDesc ¶
type Uint8MapDesc struct {
// contains filtered or unexported fields
}
Uint8MapDesc represents a map based on skip list in descending order.
func (*Uint8MapDesc) Delete ¶
func (s *Uint8MapDesc) Delete(key uint8) bool
Delete deletes the value for a key.
func (*Uint8MapDesc) Load ¶
func (s *Uint8MapDesc) Load(key uint8) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*Uint8MapDesc) LoadAndDelete ¶
func (s *Uint8MapDesc) LoadAndDelete(key uint8) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*Uint8MapDesc) LoadOrStore ¶
func (s *Uint8MapDesc) LoadOrStore(key uint8, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*Uint8MapDesc) LoadOrStoreLazy ¶
func (s *Uint8MapDesc) LoadOrStoreLazy(key uint8, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*Uint8MapDesc) Range ¶
func (s *Uint8MapDesc) Range(f func(key uint8, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*Uint8MapDesc) Store ¶
func (s *Uint8MapDesc) Store(key uint8, value interface{})
Store sets the value for a key.
type UintMap ¶
type UintMap struct {
// contains filtered or unexported fields
}
UintMap represents a map based on skip list in ascending order.
func (*UintMap) Load ¶
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*UintMap) LoadAndDelete ¶
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*UintMap) LoadOrStore ¶
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*UintMap) LoadOrStoreLazy ¶
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*UintMap) Range ¶
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
type UintMapDesc ¶
type UintMapDesc struct {
// contains filtered or unexported fields
}
UintMapDesc represents a map based on skip list in descending order.
func (*UintMapDesc) Delete ¶
func (s *UintMapDesc) Delete(key uint) bool
Delete deletes the value for a key.
func (*UintMapDesc) Load ¶
func (s *UintMapDesc) Load(key uint) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*UintMapDesc) LoadAndDelete ¶
func (s *UintMapDesc) LoadAndDelete(key uint) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*UintMapDesc) LoadOrStore ¶
func (s *UintMapDesc) LoadOrStore(key uint, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*UintMapDesc) LoadOrStoreLazy ¶
func (s *UintMapDesc) LoadOrStoreLazy(key uint, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*UintMapDesc) Range ¶
func (s *UintMapDesc) Range(f func(key uint, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*UintMapDesc) Store ¶
func (s *UintMapDesc) Store(key uint, value interface{})
Store sets the value for a key.
type UintptrMap ¶
type UintptrMap struct {
// contains filtered or unexported fields
}
UintptrMap represents a map based on skip list in ascending order.
func (*UintptrMap) Delete ¶
func (s *UintptrMap) Delete(key uintptr) bool
Delete deletes the value for a key.
func (*UintptrMap) Load ¶
func (s *UintptrMap) Load(key uintptr) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*UintptrMap) LoadAndDelete ¶
func (s *UintptrMap) LoadAndDelete(key uintptr) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*UintptrMap) LoadOrStore ¶
func (s *UintptrMap) LoadOrStore(key uintptr, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*UintptrMap) LoadOrStoreLazy ¶
func (s *UintptrMap) LoadOrStoreLazy(key uintptr, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*UintptrMap) Range ¶
func (s *UintptrMap) Range(f func(key uintptr, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*UintptrMap) Store ¶
func (s *UintptrMap) Store(key uintptr, value interface{})
Store sets the value for a key.
type UintptrMapDesc ¶
type UintptrMapDesc struct {
// contains filtered or unexported fields
}
UintptrMapDesc represents a map based on skip list in descending order.
func NewUintptrDesc ¶
func NewUintptrDesc() *UintptrMapDesc
NewUintptrDesc return an empty uintptr skipmap.
func (*UintptrMapDesc) Delete ¶
func (s *UintptrMapDesc) Delete(key uintptr) bool
Delete deletes the value for a key.
func (*UintptrMapDesc) Len ¶
func (s *UintptrMapDesc) Len() int
Len return the length of this skipmap.
func (*UintptrMapDesc) Load ¶
func (s *UintptrMapDesc) Load(key uintptr) (value interface{}, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*UintptrMapDesc) LoadAndDelete ¶
func (s *UintptrMapDesc) LoadAndDelete(key uintptr) (value interface{}, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present. (Modified from Delete)
func (*UintptrMapDesc) LoadOrStore ¶
func (s *UintptrMapDesc) LoadOrStore(key uintptr, value interface{}) (actual interface{}, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored. (Modified from Store)
func (*UintptrMapDesc) LoadOrStoreLazy ¶
func (s *UintptrMapDesc) LoadOrStoreLazy(key uintptr, f func() interface{}) (actual interface{}, loaded bool)
LoadOrStoreLazy returns the existing value for the key if present. Otherwise, it stores and returns the given value from f, f will only be called once. The loaded result is true if the value was loaded, false if stored. (Modified from LoadOrStore)
func (*UintptrMapDesc) Range ¶
func (s *UintptrMapDesc) Range(f func(key uintptr, value interface{}) bool)
Range calls f sequentially for each key and value present in the skipmap. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
func (*UintptrMapDesc) Store ¶
func (s *UintptrMapDesc) Store(key uintptr, value interface{})
Store sets the value for a key.