memory

package
v0.0.0-...-5cf8a21 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New() *Storage

func (*Storage) Delete

func (s *Storage) Delete(key string)

Delete key by key

func (*Storage) Get

func (s *Storage) Get(key string) interface{}

Get value by key

func (*Storage) Reset

func (s *Storage) Reset()

Reset all keys

func (*Storage) Set

func (s *Storage) Set(key string, val interface{}, ttl time.Duration)

Set key with value

Jump to

Keyboard shortcuts

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