BaseCache

package
v5.1.42 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteMark

func DeleteMark(mark string)

DeleteMark 删除缓冲 Deprecated

func GetByMarkInterface

func GetByMarkInterface(mark string, data interface{}) bool

GetByMarkInterface 获取缓冲模块interface数据 Deprecated

func GetByMarkInterfaceReturn

func GetByMarkInterfaceReturn(mark string) (data interface{}, b bool)

GetByMarkInterfaceReturn 获取缓冲模块interface数据 Deprecated

func GetDataByByte

func GetDataByByte(mark string, data interface{}) error

GetDataByByte 将byte转为特殊结构体 Deprecated

func GetDataByInt64

func GetDataByInt64(mark string) (val int64, b bool)

GetDataByInt64 将int64转为特殊结构体 Deprecated

func Run

func Run()

Run 将自动遍历,删除过期数据 Deprecated

func SetData

func SetData(args *DataCache)

SetData 写入数据集合 Deprecated

func SetDataByBool

func SetDataByBool(mark string, addExpireTime int64, b bool) error

SetDataByBool 直接存储对应值 Deprecated

func SetDataByByte

func SetDataByByte(mark string, addExpireTime int64, data interface{}) error

SetDataByByte 将特殊结构体转为byte Deprecated

func SetDataByFloat64

func SetDataByFloat64(mark string, addExpireTime int64, val float64) error

SetDataByFloat64 直接存储对应值 Deprecated

func SetDataByInt64

func SetDataByInt64(mark string, addExpireTime int64, val int64) error

SetDataByInt64 直接存储对应值 Deprecated

func SetDataByInterface

func SetDataByInterface(mark string, addExpireTime int64, val interface{}) error

SetDataByInterface 设置动态变量 Deprecated

Types

type ArgsGetByMark

type ArgsGetByMark struct {
	Mark string
}

ArgsGetByMark 获取某个数据集合

type DataCache

type DataCache struct {
	//创建时间
	CreateTime int64
	//过期时间
	ExpireTime int64
	//数据标识码
	// 全局唯一,否则将覆盖该数据
	Mark string
	//存储值
	Value string
	//int类型将自动改写int64,转出时可强制缩短数据
	ValueInt64 int64
	//float64
	ValueFloat64 float64
	//bool
	ValueBool bool
	//byte
	ValueByte []byte
	//缓冲器数据集合
	ValueInterface interface{}
}

func GetByMark

func GetByMark(args *ArgsGetByMark) (DataCache, bool)

Deprecated

Jump to

Keyboard shortcuts

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