lra

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	MaxEntries int
	OnEvicted  func(key Key, value interface{})
	// contains filtered or unexported fields
}

func New

func New(maxEntries int) *Cache

func (*Cache) Add

func (c *Cache) Add(key Key, value interface{})

func (*Cache) AddKey

func (c *Cache) AddKey(key Key)

func (*Cache) Clear

func (c *Cache) Clear()

func (*Cache) Contains

func (c *Cache) Contains(key interface{}) bool

func (*Cache) Empty

func (c *Cache) Empty() bool

func (*Cache) Get

func (c *Cache) Get(key Key) interface{}

Get looks up a key's value from the cache.

func (*Cache) GetValues

func (c *Cache) GetValues() []interface{}

func (*Cache) Remove

func (c *Cache) Remove(key Key)

func (*Cache) Size

func (c *Cache) Size() int

type Key

type Key interface{}

Jump to

Keyboard shortcuts

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