storage

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: BSD-3-Clause Imports: 9 Imported by: 1

Documentation

Overview

this storage can be used for projects that do not store much data and do not save memory

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	sync.Mutex

	Data map[string]*storageValue `json:"data"`
	// contains filtered or unexported fields
}

func (*Storage) Close

func (s *Storage) Close() error

func (*Storage) Dump

func (s *Storage) Dump(L *lua.LState) (map[string]lua.LValue, error)

func (*Storage) Get

func (s *Storage) Get(key string, L *lua.LState) (lua.LValue, bool, error)

func (*Storage) Keys

func (s *Storage) Keys() ([]string, error)

func (*Storage) New

func (st *Storage) New(filename string) (interfaces.Driver, error)

func (*Storage) Set

func (s *Storage) Set(key string, value lua.LValue, ttl int64) error

func (*Storage) Sync

func (s *Storage) Sync() error

Jump to

Keyboard shortcuts

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