nucleus

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2022 License: MIT Imports: 3 Imported by: 0

README

nucleus

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Add(key, value interface{})
	Set(key, value interface{}) (ok bool)
	Get(key interface{}) (value interface{}, ok bool)
	Peek(key interface{}) (value interface{}, ok bool)
	Remove(key interface{}) (ok bool)
	Contains(key interface{}) (ok bool)
	Len() int
	Cap() int
	Clear() int
	ReCap(int) error
	Keys() []interface{}
	Values() []interface{}
}

type LruCache

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

func NewLruCache

func NewLruCache(cap int) (*LruCache, error)

func (*LruCache) Add

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

func (*LruCache) Cap

func (c *LruCache) Cap() int

func (*LruCache) Clear

func (c *LruCache) Clear() int

func (*LruCache) Contains

func (c *LruCache) Contains(key interface{}) (ok bool)

func (*LruCache) Get

func (c *LruCache) Get(key interface{}) (value interface{}, ok bool)

func (*LruCache) Keys

func (c *LruCache) Keys() []interface{}

func (*LruCache) Len

func (c *LruCache) Len() int

func (*LruCache) Peek

func (c *LruCache) Peek(key interface{}) (value interface{}, ok bool)

func (*LruCache) ReCap

func (c *LruCache) ReCap(newCap int) (err error)

func (*LruCache) Remove

func (c *LruCache) Remove(key interface{}) (ok bool)

func (*LruCache) Set

func (c *LruCache) Set(key, value interface{}) (ok bool)

func (*LruCache) Values

func (c *LruCache) Values() []interface{}

Jump to

Keyboard shortcuts

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