table

package
v0.0.0-...-8806728 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Table

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

func New

func New[K comparable, V any]() Table[K, V]

func (*Table[K, V]) Clear

func (t *Table[K, V]) Clear()

func (*Table[K, V]) Empty

func (t *Table[K, V]) Empty() bool

func (*Table[K, V]) ForEach

func (t *Table[K, V]) ForEach(cb func(k K, v V) error) error

ForEach runs the provided callback for each entry of the table while keeping the lock

func (*Table[K, V]) Insert

func (t *Table[K, V]) Insert(k K, v V)

func (*Table[K, V]) Len

func (t *Table[K, V]) Len() int

func (*Table[K, V]) Lookup

func (t *Table[K, V]) Lookup(k K) (V, bool)

func (*Table[K, V]) Remove

func (t *Table[K, V]) Remove(k K)

func (*Table[K, V]) Update

func (t *Table[K, V]) Update(m map[K]V)

Jump to

Keyboard shortcuts

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