mapcache

package
v1.1.0-beta.0...-68ac9ec Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 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 MapCache

type MapCache struct {
	// contains filtered or unexported fields
}

MapCache is a cache based on map.

func NewMapCache

func NewMapCache() *MapCache

NewMapCache creates a new map cache.

func (*MapCache) Close

func (*MapCache) Close()

Close implements StatsCacheInner

func (*MapCache) Copy

func (m *MapCache) Copy() internal.StatsCacheInner

Copy implements StatsCacheInner

func (*MapCache) Cost

func (m *MapCache) Cost() int64

Cost implements StatsCacheInner

func (*MapCache) Del

func (m *MapCache) Del(k int64)

Del implements StatsCacheInner

func (*MapCache) Get

func (m *MapCache) Get(k int64) (*statistics.Table, bool)

Get implements StatsCacheInner

func (*MapCache) Keys

func (m *MapCache) Keys() []int64

Keys implements StatsCacheInner

func (*MapCache) Len

func (m *MapCache) Len() int

Len implements StatsCacheInner

func (*MapCache) Put

func (m *MapCache) Put(k int64, v *statistics.Table) bool

Put implements StatsCacheInner

func (*MapCache) SetCapacity

func (*MapCache) SetCapacity(int64)

SetCapacity implements StatsCacheInner

func (*MapCache) Values

func (m *MapCache) Values() []*statistics.Table

Values implements StatsCacheInner

Jump to

Keyboard shortcuts

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