basic

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TTLMap

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

func New

func New(ln int, maxTTL int) (m *TTLMap)

New creates a new TTLMap with a global TTL in seconds

func (*TTLMap) Get

func (m *TTLMap) Get(k string) (v interface{})

Get returns an item from the map

func (*TTLMap) Len

func (m *TTLMap) Len() int

Len returns the number of items in the map

func (*TTLMap) Put

func (m *TTLMap) Put(k string, v interface{})

Put adds an item to the map

Jump to

Keyboard shortcuts

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