field

package
v0.0.0-...-b952f1b Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item[V any] struct {
	// contains filtered or unexported fields
}

func (Item[V]) IsExpire

func (i Item[V]) IsExpire() bool

type Map

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

func NewMap

func NewMap[K comparable, V any](shardCount int) *Map[K, V]

func (*Map[K, V]) ClearTimer

func (m *Map[K, V]) ClearTimer()

func (*Map[K, V]) Delete

func (m *Map[K, V]) Delete(key K)

func (*Map[K, V]) Get

func (m *Map[K, V]) Get(key K) (V, bool)

func (*Map[K, V]) Len

func (m *Map[K, V]) Len() int

func (*Map[K, V]) Range

func (m *Map[K, V]) Range(f func(key K, value V) bool)

func (*Map[K, V]) Set

func (m *Map[K, V]) Set(key K, value V)

func (*Map[K, V]) SetExpire

func (m *Map[K, V]) SetExpire(key K, value V, expire int64)

func (*Map[K, V]) SetShardCall

func (m *Map[K, V]) SetShardCall(call func(K, int) int)

type Set

type Set[T comparable] struct {
	// contains filtered or unexported fields
}

func NewSet

func NewSet[T comparable]() *Set[T]

func NewSetByList

func NewSetByList[T comparable](values []T) *Set[T]

func (*Set[T]) Add

func (s *Set[T]) Add(value T)

func (*Set[T]) Clear

func (s *Set[T]) Clear()

func (*Set[T]) Count

func (s *Set[T]) Count() int

func (*Set[T]) List

func (s *Set[T]) List() []T

func (*Set[T]) Merge

func (s *Set[T]) Merge(s1 *Set[T])

func (*Set[T]) MergeByList

func (s *Set[T]) MergeByList(values []T)

func (*Set[T]) Remove

func (s *Set[T]) Remove(value T)

func (*Set[T]) RemoveMany

func (s *Set[T]) RemoveMany(values []T)

func (*Set[T]) String

func (s *Set[T]) String() string

Jump to

Keyboard shortcuts

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