memory

package
v2.0.79 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 7 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) (int64, 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) HashGetAll added in v2.0.32

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

func (*Memory) HashLen added in v2.0.32

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

func (*Memory) HashMGet added in v2.0.37

func (m *Memory) HashMGet(ctx context.Context, key string, fields ...string) (gvar.Vars, error)

func (*Memory) HashMSet added in v2.0.37

func (m *Memory) HashMSet(ctx context.Context, key string, fields map[string]interface{}) error

func (*Memory) HashSet added in v2.0.32

func (m *Memory) HashSet(ctx context.Context, key string, fields map[string]interface{}) (int64, error)

func (*Memory) HashVals added in v2.0.68

func (m *Memory) HashVals(ctx context.Context, key string) (gvar.Vars, error)

func (*Memory) Increase

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

func (*Memory) ListLPush added in v2.0.72

func (m *Memory) ListLPush(ctx context.Context, key string, values ...interface{}) (int64, error)

func (*Memory) ListRPop added in v2.0.70

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

func (*Memory) ListRange added in v2.0.71

func (m *Memory) ListRange(ctx context.Context, key string, start, stop int64) (gvar.Vars, 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