lru

package module
v0.0.0-...-1c4838c Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2018 License: MIT Imports: 2 Imported by: 0

README

lru

goroutine safe lru

Documentation

Overview

---------------- Func : LRU Container Author: xjh Date : 2018/09/10 Note : ----------------

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LruContainer

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

func NewLruContainer

func NewLruContainer(maxLen int) *LruContainer

func (*LruContainer) Del

func (lc *LruContainer) Del(k interface{})

删除任意值

func (*LruContainer) Get

func (lc *LruContainer) Get(k interface{}) (interface{}, bool)

查找任意值

func (*LruContainer) Len

func (lc *LruContainer) Len() int

长度

func (*LruContainer) PopBack

func (lc *LruContainer) PopBack() (interface{}, bool)

func (*LruContainer) PushFront

func (lc *LruContainer) PushFront(k, v interface{})

压入队头

Jump to

Keyboard shortcuts

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