sieve

package
v0.0.0-...-943df0e Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sieve

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

func New

func New[K comparable, V any](size int, ttl time.Duration) *Sieve[K, V]

func (*Sieve[K, V]) Close

func (s *Sieve[K, V]) Close()

func (*Sieve[K, V]) Contains

func (s *Sieve[K, V]) Contains(key K) (ok bool)

func (*Sieve[K, V]) Get

func (s *Sieve[K, V]) Get(key K) (value V, ok bool)

func (*Sieve[K, V]) Len

func (s *Sieve[K, V]) Len() int

func (*Sieve[K, V]) Peek

func (s *Sieve[K, V]) Peek(key K) (value V, ok bool)

func (*Sieve[K, V]) Purge

func (s *Sieve[K, V]) Purge()

func (*Sieve[K, V]) Remove

func (s *Sieve[K, V]) Remove(key K) (ok bool)

func (*Sieve[K, V]) Set

func (s *Sieve[K, V]) Set(key K, value V)

func (*Sieve[K, V]) SetOnEvicted

func (s *Sieve[K, V]) SetOnEvicted(callback types.OnEvictCallback[K, V])

Jump to

Keyboard shortcuts

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