structure

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 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 Index added in v0.1.6

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

Index 索引

func NewIndex added in v0.1.6

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

func (*Index[T, I]) Add added in v0.1.6

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

func (*Index[T, I]) Get added in v0.1.6

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

func (*Index[T, I]) Remove added in v0.1.6

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

func (*Index[T, I]) Set added in v0.1.6

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

Directories

Path Synopsis
cache
lru
Package consistenthash provides an implementation of a ring hash.
Package consistenthash provides an implementation of a ring hash.
idgen
id
uuid
Package uuid provides implementation of Universally Unique Identifier (UUID).
Package uuid provides implementation of Universally Unique Identifier (UUID).
Package ratelimit provides an efficient token bucket implementation that can be used to limit the rate of arbitrary things.
Package ratelimit provides an efficient token bucket implementation that can be used to limit the rate of arbitrary things.
tree

Jump to

Keyboard shortcuts

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