index

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MIT, 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 Index

type Index[T any, I comparable] struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Index 索引

func NewIndex

func NewIndex[T any, I comparable]() *Index[T, I]

func (*Index[T, I]) Add

func (i *Index[T, I]) Add(idx I, res T)

func (*Index[T, I]) Get

func (i *Index[T, I]) Get(idx I) T

func (*Index[T, I]) Remove

func (i *Index[T, I]) Remove(idx I)

func (*Index[T, I]) Set

func (i *Index[T, I]) Set(idx I, v T)

Jump to

Keyboard shortcuts

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