pkg

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GitTag      string // set at compile time with -ldflags
	GitRevision string // set at compile time with -ldflags
	GitSummary  string // set at compile time with -ldflags
	AppName     string // set at compile time with -ldflags
	AppIdentity string // set at compile time with -ldflags
)

Functions

This section is empty.

Types

type Map

type Map[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewMap

func NewMap[K comparable, V any]() *Map[K, V]

func (*Map[K, V]) Clear

func (m *Map[K, V]) Clear()

func (*Map[K, V]) CompareAndDelete

func (m *Map[K, V]) CompareAndDelete(key K, value V) bool

func (*Map[K, V]) CompareAndSwap

func (m *Map[K, V]) CompareAndSwap(key K, old, new V) bool

func (*Map[K, V]) Count

func (m *Map[K, V]) Count() (size int)

func (*Map[K, V]) Delete

func (m *Map[K, V]) Delete(key K)

func (*Map[K, V]) GetMap

func (m *Map[K, V]) GetMap() map[K]V

func (*Map[K, V]) Keys

func (m *Map[K, V]) Keys() (keys []K)

func (*Map[K, V]) Load

func (m *Map[K, V]) Load(key K) (res V, ok bool)

func (*Map[K, V]) LoadAndDelete

func (m *Map[K, V]) LoadAndDelete(key K) (res V, ok bool)

func (*Map[K, V]) LoadOrStore

func (m *Map[K, V]) LoadOrStore(key K, new V) (V, bool)

func (*Map[K, V]) Range

func (m *Map[K, V]) Range(run func(key K, value V) bool)

func (*Map[K, V]) SetMap

func (m *Map[K, V]) SetMap(mp map[K]V)

func (*Map[K, V]) SetSyncMap

func (m *Map[K, V]) SetSyncMap(mp *Map[K, V])

func (*Map[K, V]) SetSyncMaps

func (m *Map[K, V]) SetSyncMaps(mps ...*Map[K, V])

func (*Map[K, V]) Store

func (m *Map[K, V]) Store(key K, value V)

func (*Map[K, V]) Swap

func (m *Map[K, V]) Swap(key K, value V) (pre V, ok bool)

func (*Map[K, V]) Values

func (m *Map[K, V]) Values() (values []V)

Directories

Path Synopsis
fs
oss
Package watcher implements recursive folder monitoring by wrapping the excellent fsnotify library
Package watcher implements recursive folder monitoring by wrapping the excellent fsnotify library

Jump to

Keyboard shortcuts

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