types

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detachable added in v1.4.0

type Detachable interface {
	Detach()
}

type Keyed

type Keyed interface {
	MapKey() uint64
	ShardKey() uint64
}

Keyed defines a unique key and a precomputed shard key for the value.

type Released added in v0.9.3

type Released interface {
	Acquire() (isAcquired bool)
	Release()
	Detach()
}

type Sized

type Sized interface {
	Weight() int64
}

Sized provides memory usage accounting for cache entries.

type SizedBox

type SizedBox[T any] struct {
	Value        T
	CalcWeightFn func(s *SizedBox[T]) int64
}

func (*SizedBox[T]) Weight

func (s *SizedBox[T]) Weight() int64

type Versioned added in v0.9.5

type Versioned interface {
	Version() uint64
}

Jump to

Keyboard shortcuts

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