obliviousmap

package
v0.0.0-...-10a0d72 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObliviousMap

type ObliviousMap[T any] struct {
	// contains filtered or unexported fields
}

func NewObliviousMap

func NewObliviousMap[T any](prefix string, expire time.Duration, updateTimeIfWrite bool, driver memutils.MemDriver[T]) *ObliviousMap[T]

func (*ObliviousMap[T]) Add

func (om *ObliviousMap[T]) Add(key string) int

func (*ObliviousMap[T]) AddBy

func (om *ObliviousMap[T]) AddBy(key string, val int) int

func (*ObliviousMap[T]) Exist

func (om *ObliviousMap[T]) Exist(key string) bool

func (*ObliviousMap[T]) Get

func (om *ObliviousMap[T]) Get(key string) (T, bool)

func (*ObliviousMap[T]) Hold

func (om *ObliviousMap[T]) Hold(fn func())

func (*ObliviousMap[T]) Set

func (om *ObliviousMap[T]) Set(key string, value T) T

func (*ObliviousMap[T]) SetExpire

func (om *ObliviousMap[T]) SetExpire(key string, duration time.Duration) time.Duration

func (*ObliviousMap[T]) Unset

func (om *ObliviousMap[T]) Unset(key string)

func (*ObliviousMap[T]) Wipe

func (om *ObliviousMap[T]) Wipe()

func (*ObliviousMap[T]) WipePrefix

func (om *ObliviousMap[T]) WipePrefix(prefix string)

Jump to

Keyboard shortcuts

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