syncx: github.com/gobuffalo/syncx Index | Files

package syncx

import "github.com/gobuffalo/syncx"

Index

Package Files

byte_map.go int_map.go interface_map.go string_map.go version.go

Constants

const Version = "v0.0.1"

Version of syncx

type ByteMap Uses

type ByteMap struct {
    // contains filtered or unexported fields
}

ByteMap wraps sync.Map and uses the following types: key: string value: []byte

func (*ByteMap) Delete Uses

func (m *ByteMap) Delete(key string)

Delete the key from the map

func (*ByteMap) Keys Uses

func (m *ByteMap) Keys() []string

Keys returns a list of keys in the map

func (*ByteMap) Load Uses

func (m *ByteMap) Load(key string) ([]byte, bool)

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 Uses

func (m *ByteMap) LoadOrStore(key string, value []byte) ([]byte, bool)

LoadOrStore will return an existing key or store the value if not already in the map

func (*ByteMap) Range Uses

func (m *ByteMap) Range(f func(key string, value []byte) bool)

Range over the []byte values in the map

func (*ByteMap) Store Uses

func (m *ByteMap) Store(key string, value []byte)

Store a []byte in the map

type IntMap Uses

type IntMap struct {
    // contains filtered or unexported fields
}

IntMap wraps sync.Map and uses the following types: key: string value: int

func (*IntMap) Delete Uses

func (m *IntMap) Delete(key string)

Delete the key from the map

func (*IntMap) Keys Uses

func (m *IntMap) Keys() []string

Keys returns a list of keys in the map

func (*IntMap) Load Uses

func (m *IntMap) Load(key string) (int, bool)

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 Uses

func (m *IntMap) LoadOrStore(key string, value int) (int, bool)

LoadOrStore will return an existing key or store the value if not already in the map

func (*IntMap) Range Uses

func (m *IntMap) Range(f func(key string, value int) bool)

Range over the int values in the map

func (*IntMap) Store Uses

func (m *IntMap) Store(key string, value int)

Store a int in the map

type Map Uses

type Map struct {
    // contains filtered or unexported fields
}

Map wraps sync.Map and uses the following types: key: string value: interface{}

func (*Map) Delete Uses

func (m *Map) Delete(key string)

Delete the key from the map

func (*Map) Keys Uses

func (m *Map) Keys() []string

Keys returns a list of keys in the map

func (*Map) Load Uses

func (m *Map) Load(key string) (interface{}, bool)

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 Uses

func (m *Map) LoadOrStore(key string, value interface{}) (interface{}, bool)

LoadOrStore will return an existing key or store the value if not already in the map

func (*Map) Range Uses

func (m *Map) Range(f func(key string, value interface{}) bool)

Range over the interface{} values in the map

func (*Map) Store Uses

func (m *Map) Store(key string, value interface{})

Store a interface{} in the map

type StringMap Uses

type StringMap struct {
    // contains filtered or unexported fields
}

StringMap wraps sync.Map and uses the following types: key: string value: string

func (*StringMap) Delete Uses

func (m *StringMap) Delete(key string)

Delete the key from the map

func (*StringMap) Keys Uses

func (m *StringMap) Keys() []string

Keys returns a list of keys in the map

func (*StringMap) Load Uses

func (m *StringMap) Load(key string) (string, bool)

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 Uses

func (m *StringMap) LoadOrStore(key string, value string) (string, bool)

LoadOrStore will return an existing key or store the value if not already in the map

func (*StringMap) Range Uses

func (m *StringMap) Range(f func(key string, value string) bool)

Range over the string values in the map

func (*StringMap) Store Uses

func (m *StringMap) Store(key string, value string)

Store a string in the map

Package syncx imports 2 packages (graph) and is imported by 1 packages. Updated 2018-11-20. Refresh now. Tools for package owners.