rwstore

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RWList

type RWList[V any] struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewRWList

func NewRWList[V any]() *RWList[V]

func (*RWList[V]) Append

func (rw *RWList[V]) Append(value V)

func (*RWList[V]) Copy

func (rw *RWList[V]) Copy() []V

func (*RWList[V]) Get

func (rw *RWList[V]) Get(index int) (V, bool)

func (*RWList[V]) Replace

func (rw *RWList[V]) Replace(newList []V)

type RWMap

type RWMap[K comparable, V any] struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewRWMap

func NewRWMap[K comparable, V any]() *RWMap[K, V]

func (*RWMap[K, V]) Delete

func (rw *RWMap[K, V]) Delete(key K)

func (*RWMap[K, V]) Exists

func (rw *RWMap[K, V]) Exists(key K) bool

func (*RWMap[K, V]) Get

func (rw *RWMap[K, V]) Get(key K) (V, bool)

func (*RWMap[K, V]) Iterate

func (rw *RWMap[K, V]) Iterate(iter func(K, V) bool)

func (*RWMap[K, V]) Len

func (rw *RWMap[K, V]) Len() int

func (*RWMap[K, V]) Set

func (rw *RWMap[K, V]) Set(key K, value V)

Jump to

Keyboard shortcuts

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