memory

package
v2.0.26 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

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

func NewMemory

func NewMemory() *Memory

NewMemory memory模式

func (*Memory) Decrease

func (m *Memory) Decrease(ctx context.Context, key string) error

func (*Memory) Del

func (m *Memory) Del(ctx context.Context, key string) error

func (*Memory) Expire

func (m *Memory) Expire(ctx context.Context, key string, dur time.Duration) error

func (*Memory) Get

func (m *Memory) Get(ctx context.Context, key string) (*gvar.Var, error)

func (*Memory) HashDel

func (m *Memory) HashDel(ctx context.Context, hk, key string) error

func (*Memory) HashGet

func (m *Memory) HashGet(ctx context.Context, hk, key string) (*gvar.Var, error)

func (*Memory) Increase

func (m *Memory) Increase(ctx context.Context, key string) error

func (*Memory) Set

func (m *Memory) Set(ctx context.Context, key string, val interface{}, expire int) error

func (*Memory) String

func (*Memory) String() string

Jump to

Keyboard shortcuts

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