hashset

package
v0.0.0-...-bb1a4e7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashSet

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

func NewHashSet

func NewHashSet() HashSet

func NewHashSetPtr

func NewHashSetPtr() *HashSet

func (*HashSet) ClearFast

func (hs *HashSet) ClearFast()

clears the map without extra allocations faster since go 1.11

type HashSetAtomic

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

func NewAtomicHashSet

func NewAtomicHashSet() HashSetAtomic

func NewAtomicHashSetPtr

func NewAtomicHashSetPtr() HashSetAtomic

func (*HashSetAtomic) Add

func (set *HashSetAtomic) Add(item string)

func (*HashSetAtomic) Clear

func (set *HashSetAtomic) Clear()

func (*HashSetAtomic) ClearFast

func (set *HashSetAtomic) ClearFast()

func (*HashSetAtomic) Contains

func (set *HashSetAtomic) Contains(item uint32) bool

func (*HashSetAtomic) ContainsString

func (set *HashSetAtomic) ContainsString(item string) bool

func (*HashSetAtomic) LoadFromArray

func (set *HashSetAtomic) LoadFromArray(data []string)

func (*HashSetAtomic) LoadFromJSONArray

func (set *HashSetAtomic) LoadFromJSONArray(path string)

func (*HashSetAtomic) LoadFromRaw

func (set *HashSetAtomic) LoadFromRaw(path string, splitChar string)

func (*HashSetAtomic) Read

func (set *HashSetAtomic) Read() HashUint32Set

func (*HashSetAtomic) Remove

func (set *HashSetAtomic) Remove(item string)

func (*HashSetAtomic) Size

func (set *HashSetAtomic) Size() int

func (*HashSetAtomic) UnsafeAddUint32

func (set *HashSetAtomic) UnsafeAddUint32(v uint32)

this call is considered as unsafe because write locks are removed from it

type HashSetMutex

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

func NewHashSetMutex

func NewHashSetMutex() HashSetMutex

func NewHashSetMutexPtr

func NewHashSetMutexPtr() *HashSetMutex

func (*HashSetMutex) Add

func (s *HashSetMutex) Add(item string)

func (*HashSetMutex) Clear

func (s *HashSetMutex) Clear()

func (*HashSetMutex) ClearFast

func (s *HashSetMutex) ClearFast()

func (HashSetMutex) Contains

func (s HashSetMutex) Contains(item string) bool

func (*HashSetMutex) LoadFromArray

func (s *HashSetMutex) LoadFromArray(data []string)

content loaded via this method will make to allocate data on the heap

func (*HashSetMutex) LoadFromJSONArray

func (s *HashSetMutex) LoadFromJSONArray(path string)

func (*HashSetMutex) LoadFromRaw

func (s *HashSetMutex) LoadFromRaw(path string, splitChar string)

func (HashSetMutex) MatchAny

func (s HashSetMutex) MatchAny(item string) bool

func (*HashSetMutex) Remove

func (s *HashSetMutex) Remove(item string)

func (*HashSetMutex) Size

func (s *HashSetMutex) Size() int

type HashSetWORM

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

HashSet WORM (Write Once Read Many) is an unsafe data structure in where data is loaded once for example, at init() functions an it is readed, after loading many times avoiding further modifications after being loaded.

func NewHashSetWORM

func NewHashSetWORM() HashSetWORM

func NewHashSetWORMPtr

func NewHashSetWORMPtr() *HashSetWORM

func (*HashSetWORM) Add

func (s *HashSetWORM) Add(item string)

func (*HashSetWORM) Clear

func (s *HashSetWORM) Clear()

func (*HashSetWORM) ClearFast

func (s *HashSetWORM) ClearFast()

func (HashSetWORM) Contains

func (s HashSetWORM) Contains(item string) bool

func (*HashSetWORM) LoadFromArray

func (s *HashSetWORM) LoadFromArray(data []string)

content loaded via this method will make to allocate data on the heap

func (*HashSetWORM) LoadFromJSONArray

func (s *HashSetWORM) LoadFromJSONArray(path string)

func (*HashSetWORM) LoadFromRaw

func (s *HashSetWORM) LoadFromRaw(path string, splitChar string)

func (HashSetWORM) MatchAny

func (s HashSetWORM) MatchAny(item string) bool

func (*HashSetWORM) Remove

func (s *HashSetWORM) Remove(item string)

func (*HashSetWORM) Size

func (s *HashSetWORM) Size() int

type HashUint32Set

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

func NewHashUint32Set

func NewHashUint32Set() HashUint32Set

func NewHashUint32SetPtr

func NewHashUint32SetPtr() *HashUint32Set

func (*HashUint32Set) ClearFast

func (hs *HashUint32Set) ClearFast()

clears the map without extra allocations faster since go 1.11

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL